May 3, 2007 at 5:40 pm
In the table I have records:
ID Value
ID1 value1
ID2 value2
ID3 value3
In VB.NET form I need to get those IDs/Values from the database and display it in the Form like
checkbox with name ID1 - label for checkbox with value value1
checkbox with name ID2 - label for checkbox with value value2
etc.
so at the end user can check any checkboxes, submit Form and data will be procesed somehow.
Where can I get an example how to use repeater control with checkboxes, how to determine what checkboxes were checked so I could record it to the database?
May 4, 2007 at 3:00 pm
I found you two possible solutions but they are in C# so I got you the best free code converter too. You have run into known issues with work around solutions. Hope this helps.
http://msdn2.microsoft.com/en-us/library/aa478959.aspx
http://www.codeproject.com/useritems/CheckBoxCommand.asp
http://www.carlosag.net/Tools/CodeTranslator/Default.aspx
Kind regards,
Gift Peddie
May 4, 2007 at 4:27 pm
Dear Peddie,
http://www.codeproject.com/useritems/CheckBoxCommand.asp - this one solved the problem, I converted C# into VB and it works fine .
Last thing for me left is on some event check or uncheck all those checkboxes in the repeaters, like in the Yahoo mail "check all", "uncheck all". .
I have two repeaters and depending what value user choses from the drop down menu, I show one repeater or another and I record checked values into the hidden field (or if user uncheck something, I remove it from the hidden field).
If user have choses one repeater from the drop down value, checks something, then doesnt like it and choses another repeater from the drop down value, check something, then goes back to the first choice, those checkboxes from the first repeater are still checked. So he could think if he presses submit button, he will save these values. This is not the case.
So I want on the drop down menu change event set checkboxes in both repeaters to checked = "false" because in other case it's a potential bug.
May 4, 2007 at 5:50 pm
The CheckBox control is called a black box control Microsoft did not share the internals, there are some user created custom controls you can use for free, see if what is in the link below meets your needs. When it comes to web controls look for existing code because Microsoft is known to omit methods here and there which are exploited by so called web super coders. So my advice look for code and spend time with the docs this time it is the .NET SDK. Hope this helps.
Kind regards,
Gift Peddie
May 7, 2007 at 8:21 am
Thanks again.Unfortunately they always put too much on your plate ..
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply