G
Guest
Hi,
I have x number of table rows that all should have a checkbox and a
dropdownlist on each row. The checkbox could be checked and the dropdown
should contain y number of values that are related to the row. I can't find a
good control for this in ASP.Net 2.0.
Now I use a repeater and check the checkbox on ItemDataBound, I also fill
the dropdown on this event. My first problem is that i find this event very
messy. I have to cast between different types because of the repeater
(dataitem, row etc). I also have to check for the right ListItemType and so
on ... However this could be OK. But the big challenge occurs when I'm about
to write the edited data back to the database. I have a save button. On the
postback that fires when i push this i then have go to the repeater and get
all it's controls. Loop these (all the repeaters rows) and find my controls
by there id to finally find out if a checkbutton has changed value or a
different selection on the dropdown has been selected.
I hope someone has a better idea to solve this. Is there a better suited
control i missed or could i use the repeater differently?
Thanks in advance
Richard
I have x number of table rows that all should have a checkbox and a
dropdownlist on each row. The checkbox could be checked and the dropdown
should contain y number of values that are related to the row. I can't find a
good control for this in ASP.Net 2.0.
Now I use a repeater and check the checkbox on ItemDataBound, I also fill
the dropdown on this event. My first problem is that i find this event very
messy. I have to cast between different types because of the repeater
(dataitem, row etc). I also have to check for the right ListItemType and so
on ... However this could be OK. But the big challenge occurs when I'm about
to write the edited data back to the database. I have a save button. On the
postback that fires when i push this i then have go to the repeater and get
all it's controls. Loop these (all the repeaters rows) and find my controls
by there id to finally find out if a checkbutton has changed value or a
different selection on the dropdown has been selected.
I hope someone has a better idea to solve this. Is there a better suited
control i missed or could i use the repeater differently?
Thanks in advance
Richard