Discussion Locked

Checkbox - DATAREPEATER Control

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
I have put a checkbox on a UserControl, and bound it to a DataRepeater on a Form. When I run it, it looks fine, just what I want to see...Each record with a checkbox next to it.....EXCEPT, that when one record loses focus, if I click the checkbox, it clears when I move to another record............I guess I'm looking for the ability to 'multi-select' (ea checkbox) and then update the recordset... Please help...TIA!

3 replies

by spankil

Hi,
If I am not wrong your basic problem is to Show the Checkboxes for Yes/No type of field in the grid. This is not possible directly when we give the datasource to the grid it converts No to 0 and Yes to -1.

Now you have tried Data Repeater Control to solve out that problem thats fine but without using this control you can directly use a checkbox into the grid as followds.

Set Data Source property of the Checkbox to your Recordsource and Data Field to your field.
Create an Index arrayof checkboxes.
Loop through the grid and Create new checkboxes Place it in the grid with suitable X/Y Coords

Hope this will help u.
Bye.

by rsp05

You put me on the right road for where I needed to go, and even though there is no direct update( i.e. I must loop through all the checkbox values, and then update the recordset), I nonetheless accomplished what I needed to do (probably a betterway, but ok for now) SO, thanks much!

This discussion is closed to new replies.