Hi,
I've added a checkbox column in the ultragrid using grid designer, the problem is that the cell click event is behaving abnormally as i'am trying to toggle the checkbox state,and its not firing events related to cell like cell change , cell update events as desired, mean to say that some times checkbox changes state but no event get fired and sometimes all concerned event get fired .Do any body has any idea what should be the cause of the problem??
The checkbox cell behaves like any other cell. The events are being fired only when the cell loses focus. I think this is not intuitive for a checkbox, so for any grid I have I use the cellclick event and I call PerformAction(ExitEditMode) if the column.StyleResolved is a checkbox.
It sounds like you are using the Before/AfterCellUpdate events. These events only fire when the data is committed to the grid's underlying data source.
If you want to trap when a cell changes immediately, you should use the CellChange event. Note that you must use the Text property of the cell inside this event. You can't use Value, because Value doesn't get updated until you leave the cell.
Hello Mike
I need to add checked cell value to Datatable.My code is below.But every time when I check cell it add only selected cell value.Currently selected.Not all selected cells values.May be problem in event(cell_change)?Help please.
private void ultraGrid3_CellChange(object sender, CellEventArgs e)
{ DataTable dt = new DataTable();
dt.Columns.Add("Fields",typeof(String));
DataRow row = dt.NewRow();
row[0] =e.Cell.Row.Cells["Selected_Fields"].Value.ToString();
dt.Rows.Add(row);
return dt;
this.ultraGrid4.DataSource = dt;
}
Thanks in advance