I want to develop the WinGrid like a System.Windows.Forms.ListLiew control with checkboxes. There i can get the information, if the user has checked or selected an item.
In the datasource of my WinGrid i have a field called checked. I used my own CreationFilter object and added an ElementClick event to the CheckBoxUIElement. But there is a problems with the CellClickAction and RowSelect and the event does not raise.
How can i get an event if this checkbox in the selected line was checked (unchecked) or only the line was selected.
For the same thing , I have right the code in cellChage event.
To Check wthr the chkbox is (Checked/UnChecked).
you can write like
e.Cell.Text;
Dont use e.cell.Value
e.cell.Value will be the same as it was binded.
if you want to get some other column value from cellChage event. write it as
e.cell.row.cells["columnOne"].Text
--------------------------------------------
if you got any other better way, please let me knw
Nice idea :-)
But i have to select the full line too and set
...DisplayLayout.Override.CellClickAction = RowSelect
In this mode you will not get any cell events
If CellClickAction is set to RowSelect, then clicking on the cell will not enter edit mode and thus it will not change the state of the checkbox.
I'm not really clear on what you are trying to acheive here. It sounds like maybe you should not be using selection, but that you want to the CheckBoxes to indicates the "selected" rows. If that's the case, then I would leave CellClickAction set to the default. Then you can disable editing of the grid in all columns except the checkbox column using the CellActivation property on the column. Then I would use the InitializeRow event of the grid to apply an appearance to the row based on the value of the CheckBox column so that the checked rows appear selected.