QS
Qingde Shi
August 7, 2007 03:45 PM UTC
Well, I think I found this out. you have to handle SaveCellInfo event. somehow this is bit different from celltype like TextBox, in that, if you do not handling SaveCellInfo, it still appears editable.
>Hi,
How could I make CheckBox in Virtual Grid clickable?
Thanks.
Q
Here is the code I use:
private void gridControl1_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)
{
if (e.RowIndex == 2 && e.ColIndex == 2)
{
e.Style.CellValue = true;
e.Style.Description = "Something";
e.Style.CellType = "CheckBox";
e.Style.TriState = false;
e.Handled = true;
}
}
GR
Golda Rebecal
Syncfusion Team
August 14, 2007 09:03 AM UTC
Hi,
If the cell type is CheckBox, the SaveCellInfo event is immediately fired when we click on the CheckBox. If we do not handle this event, the value is not saved and CheckBox retains its original value and appears as non-editable. But in the case of TextBox, SaveCellInfo event is fired only after we finish editing.
Kindly let me know if you have any questions.
Best regards,
Golda