John (Yiannis) Toutountzoglou
asked on
Datagridview Check Box
In my DatagridView The last Column Is A checkbox Column.
Since I need only one of the checkboxes to be the main one,i want when i click on it all the others to return in a read only state untill i uncheck it
Please Guide me .
Since I need only one of the checkboxes to be the main one,i want when i click on it all the others to return in a read only state untill i uncheck it
Please Guide me .
Why not use a RadioButton instead?
ASKER
I never thought about it ..let me check it for a while and i msg you back..
thank you for your reply...
thank you for your reply...
ASKER
How do i represent a radio button in a datagridview ?...there no choise to change a checkbox column to a radio button column.
ASKER
i think it a litle trick for me and not for my level...(it is not vb.net)
How about this..
i need only one check box to be checked
In a total of Rows.Count if >1 checkboxes are checked then message and reject last changes?
This Will Be accomplished by clicking the save button..
I have a code for that is this a good way?
How about this..
i need only one check box to be checked
In a total of Rows.Count if >1 checkboxes are checked then message and reject last changes?
This Will Be accomplished by clicking the save button..
I have a code for that is this a good way?
You might be able to do that by attaching to the EditorControlShowing event handler, checking the state of a module-level state flag, and set the CheckBox.Enabled = False for all other CheckBoxes.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It is working ...i just add the
If CheckboxCount =0 then....
because always i need one to be checked..
thank you CodeCruiser
If CheckboxCount =0 then....
because always i need one to be checked..
thank you CodeCruiser
ASKER
Thanks Also the LearnedOne for his answers
ASKER
Code Cruiser ....just a correction....i change the "Value" with "FormattedValue"
to prevent the DBNULL TO BOOLEAN CONVERSION
to prevent the DBNULL TO BOOLEAN CONVERSION
That is a good step. You could also use the IsDBNull function to make sure its not null.
ASKER
i 've done it both ....and both works properly....
see u in another question...thank you very much
see u in another question...thank you very much