We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

syncfusion check box

Thread ID:

Created:

Updated:

Platform:

Replies:

80049 Mar 10,2009 05:30 AM UTC Mar 18,2009 11:24 AM UTC Windows Forms 3
loading
Tags: GridControl
Lincy Rose
Asked On March 10, 2009 05:30 AM UTC

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


Rajadurai C [Syncfusion]
Replied On 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


Lincy Rose
Replied On 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

Rajadurai C [Syncfusion]
Replied On 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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;