syncfusion check box

Dear friend,
I am using syncfusion grid in virtual mode.
In that there is a column with cell type check box.I am using the event CheckBoxClick.
This event is raised only if user clicks in the cell. not inside the check box.I would like to know how to raise this event.
This problem happens especially when you have a vertical scroll bar option. once you try to sroll down fully and then try to check the check boxes, once the second click will fire the event


3 Replies

RC Rajadurai C Syncfusion Team March 10, 2009 09:55 AM UTC

Hi Lincy,

Thanks for your interest in Syncfusion products.

I tried to reproduce this issue in our browser sample 'Virtual Grid Tutorial' by setting checkbox celltype for a column in QueryCellInfo event. But it works fine. The CheckBoxClick() event get triggerred on clicking on checkbox on first attempt itself and not on the cell which contain it.

gridControl1.CheckBoxClick += new GridCellClickEventHandler(gridControl1_CheckBoxClick);
void gridControl1_CheckBoxClick(object sender, GridCellClickEventArgs e)
{
Console.WriteLine("Clicked");
}

If you need to edit data, please try to save data back to datasource through SaveCellInfo event.

If this doesn't helps, please provide a sample reproducing the issue.

Regards,
Rajadurai



LR Lincy Rose March 18, 2009 09:36 AM UTC

Hi Rajadurai,
Please find the attached code snippet for the problem.afer the first check box click each checkbox has to be clicked twice to get it checked.

>Hi Lincy,

Thanks for your interest in Syncfusion products.

I tried to reproduce this issue in our browser sample 'Virtual Grid Tutorial' by setting checkbox celltype for a column in QueryCellInfo event. But it works fine. The CheckBoxClick() event get triggerred on clicking on checkbox on first attempt itself and not on the cell which contain it.

gridControl1.CheckBoxClick += new GridCellClickEventHandler(gridControl1_CheckBoxClick);
void gridControl1_CheckBoxClick(object sender, GridCellClickEventArgs e)
{
Console.WriteLine("Clicked");
}

If you need to edit data, please try to save data back to datasource through SaveCellInfo event.

If this doesn't helps, please provide a sample reproducing the issue.

Regards,
Rajadurai





sampleCheckbox_a13e349a.zip


RC Rajadurai C Syncfusion Team March 18, 2009 11:24 AM UTC

Hi Lincy,

Thanks for the sample.

In a virtual grid, you would have to handle the SaveCellInfo event to save the changes made back to your virtual datasource, and set e.Handled = true to tell the grid not to try to save any other.

Please try to handle the event SaveCellInfo with the following code in the sample.

GridControl1.SaveCellInfo += new Syncfusion.Windows.Forms.Grid.GridSaveCellInfoEventHandler(GridControl1_SaveCellInfo);

//Event
void GridControl1_SaveCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridSaveCellInfoEventArgs e)
{
if (e.ColIndex == 1 && e.RowIndex > 1)
{
e.Handled = true;
}
}


This code solves the issue in the provided sample.

Regards,
Rajadurai


Loader.
Up arrow icon