1. Going through each control on the page to check if it is inherited from ICustomMessageInfo interface. If there are 100 controls on the page and you have 10 controls that inherits from ICustomMessageInfo interface. This means you are visiting 90 controls
that is not required.
Suggested Solution : Try to maintain a list on each page that will hold the controls that are inherited. Maybe you will have to go through all controls once (to fill this list), but on successive request you will directly have a references in this list.
2. Performance is degraded while shifting cells down and moving controls.
Suggested Solution : When you are inheriting the control, try to design the control such that it has two rows. The bottom row contains the control and the above row holds a label that will display the message. If there is no message, the label will be empty.
Mark the post as Answer if it helped you so that others dont waste time looking for solution
1st solution: I am working for one product , so everything we need to drag and drop my control in to the UI-Panel(dynamic table) . in run time we will refer this one to webpart.
Yes I can get what are all the controls in one list but if i am not setting any custom message ...? again i can set the customessage via script and backend also ..? any solution for this ?
2nd solution:
Yes i can agree but we have alredy designed all the controls in this product . Now i can't recreate because of this feature ..
I don't want to recreate my textbox with two rows and ... it will give effect actula textbox functionality. menas in html view instead of text box we will get table + text box that is not good :)
- The purpose of our existance is not justto make a living ...... but make a life... so lead life where it means a lot :)
kanthaa
Member
210 Points
53 Posts
Show Messages on top of the control ( need architectual solution)
May 23, 2011 09:35 AM|LINK
Question: Display messages on top of the control giving performance problem.
I have strange requirement like i need to display custom messageon top of the control. I can display but in my applicaion every thing is need to place
inside the table.
Let say i have textbox control so i need to find whether that control is need to display custommessage or not ?
So my implementation is , i have inherited all the controls who wants to display custom message from ICustomMessageInfo interface.
Then in serverside i am verifying each row and each cell is there and control inheriting ICustomMessageInfo...?
Let say i got one control then am adding new row and transforing all controls to newrow. then i am placing my message on top of the cell.
It is fine. But the problem is performance...? I got serious performance problem.
Any generic idea how we can do this requirement . I tried in client side but same thing i need to do via javascript.
Any help please .....?
Visit : http://dotnetstars.blogspot.com
Lateef045
Star
7813 Points
1541 Posts
Re: Show Messages on top of the control ( need architectual solution)
May 23, 2011 11:04 AM|LINK
There are two flaws in your approach.
1. Going through each control on the page to check if it is inherited from ICustomMessageInfo interface. If there are 100 controls on the page and you have 10 controls that inherits from ICustomMessageInfo interface. This means you are visiting 90 controls that is not required.
Suggested Solution : Try to maintain a list on each page that will hold the controls that are inherited. Maybe you will have to go through all controls once (to fill this list), but on successive request you will directly have a references in this list.
2. Performance is degraded while shifting cells down and moving controls.
Suggested Solution : When you are inheriting the control, try to design the control such that it has two rows. The bottom row contains the control and the above row holds a label that will display the message. If there is no message, the label will be empty.
kanthaa
Member
210 Points
53 Posts
Re: Show Messages on top of the control ( need architectual solution)
May 23, 2011 12:59 PM|LINK
Thank you for your mail.
Thank you for your 2 solutions.
1st solution: I am working for one product , so everything we need to drag and drop my control in to the UI-Panel(dynamic table) . in run time we will refer this one to webpart.
Yes I can get what are all the controls in one list but if i am not setting any custom message ...? again i can set the customessage via script and backend also ..? any solution for this ?
2nd solution:
Yes i can agree but we have alredy designed all the controls in this product . Now i can't recreate because of this feature ..
I don't want to recreate my textbox with two rows and ... it will give effect actula textbox functionality. menas in html view instead of text box we will get table + text box that is not good :)
Visit : http://dotnetstars.blogspot.com