Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
Problem with Unbound Checkbox Column
posted

I'm working on a Customer Form for my application.  We need to track a 1:many relationship between the customer and internal Orgaqnizations for the firm.  There are currently three which is unlikely to ever change (perhaps there would be a few more over time).

I'd like to represent this by showing a grid of all Three organizations for the firm with a checkbox indicating whether the current customer is assigned to that organization.  I bound the Grid to the global Organization List  - ID (Hidden), Name, and Description - each set to ReadOnly (CellActivition: NoEdit)

At design time I added an Unbound Column Named "Selected" with type of "Boolean" and Style "Checkbox"

In the Initialize Row Event, I check the Customer's List of Organizations, if the ID is present I set the checkbox value to True.

In the "Save Button Click" Event - I iterate through the grid rows to check the state of the checkbox - if it will get added to the customer's list (assuming it hasn't already) and if clear - Remove it from the list if it exists.

Here's my problem:

Setting the checkboxes work fine - by clearing them doesn't.  The value still shows as True.  Also If I click on another checkbox after clearing one, it reverts the first box back to checked.

How can I get the grid to behave the way I desire?

Thanks!

Dan