Design Ideas - List Of Custom controls.
-
Ok, I have been fighting with coming up with a solution here. The problem I need to solve. I have a list, lets just say for example... a custom control.. contains a textbox a, and b. Ok, I store this in a generic list... I can add more and more of these items in that list.. I need to move them up and down... and also hook in call backs.. I need to remember what items are in the list.. and their values on each post back.. I solved this by setting their ids and storing them in a viewstate.. and then re-creating them each time.. works great.. but can only happen in Page_Load and since that happens before click... + and - cannot manipulate the order of the list because its already rendered out and events are hooked so I cant move it.. out that I know of. Now, I have wrote a ton of code... and I can get some of it working but due to life cycle hell.. Its not all working... so I am going back to the drawing board here and figured I would ask other developers for their opinions on a solution. Need to stack dynamic controls with call backs and store their values across post backs.. users can add and remove.. and also order the controls in a list.. Any ideas on possible solutions to this issue in .net that maybe I did not think of ?
=)
-
Ok, I have been fighting with coming up with a solution here. The problem I need to solve. I have a list, lets just say for example... a custom control.. contains a textbox a, and b. Ok, I store this in a generic list... I can add more and more of these items in that list.. I need to move them up and down... and also hook in call backs.. I need to remember what items are in the list.. and their values on each post back.. I solved this by setting their ids and storing them in a viewstate.. and then re-creating them each time.. works great.. but can only happen in Page_Load and since that happens before click... + and - cannot manipulate the order of the list because its already rendered out and events are hooked so I cant move it.. out that I know of. Now, I have wrote a ton of code... and I can get some of it working but due to life cycle hell.. Its not all working... so I am going back to the drawing board here and figured I would ask other developers for their opinions on a solution. Need to stack dynamic controls with call backs and store their values across post backs.. users can add and remove.. and also order the controls in a list.. Any ideas on possible solutions to this issue in .net that maybe I did not think of ?
=)
Can you give us some idea on which portion of code/functionality is not working in your case ?
Thanks -Amit Gajjar