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

GridControl CheckBoxClick invoked twice

Thread ID:

Created:

Updated:

Platform:

Replies:

40427 Feb 2,2006 03:49 PM UTC Feb 2,2006 05:51 PM UTC Windows Forms 4
loading
Tags: GridControl
Sanjit Roy
Asked On February 2, 2006 03:49 PM UTC

Hi, I have a Gridcontrol and one of my columns is populated with checkbox (defined using a gridRangeStyle.StyleInfo.CellType = "CheckBox"). I''ve setup both the event handlers (CheckBoxClick and CellsChanged) on the Gridcontrol. Both these event handlers are invoked twice whenever the checkbox is clicked. Is this the normal behaviour? I''d expect the event handlers to be invoked once. This is causing a work around to be written in my code. Please advise. Thanks, Sanjit

Sanjit Roy
Replied On February 2, 2006 03:52 PM UTC

I''d missed out to mention that i''m using Syncfusion Essential Studio 4.1.0.50 and Visual Studio 2003.

stanleyj [Syncfusion]
Replied On February 2, 2006 04:10 PM UTC

Hi Sanjit, These events are raised only once in this sample. Please let me know if you find issues. Best regards, Stanley

Sanjit Roy
Replied On February 2, 2006 04:54 PM UTC

Stanley, Thanks for your prompt response. The sample you provided does invoke the CheckBoxClick once. The only difference i see between the two codes is that in your code, the checkbox cell is defined using a GridCellInfo object and then setting the gridCellInfo1.StyleInfo.CellType = "CheckBox"; On the other hand, the checkbox is defined in my code using the following snippet of code: Syncfusion.Windows.Forms.Grid.GridRangeStyle gridRangeStyle = new Syncfusion.Windows.Forms.Grid.GridRangeStyle(); gridRangeStyle.Range = Syncfusion.Windows.Forms.Grid.GridRangeInfo.Cell(2, 1); gridRangeStyle.StyleInfo.CellType = "CheckBox"; gridRangeStyle.StyleInfo.Tag = "checkBox1"; gridRangeStyle.StyleInfo.HorizontalAlignment = Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Center; // Add the RangeStyle to the GridControl gridControl.RangeStyles.Add(gridRangeStyle); I''d assume that both ways of implementing the checkbox on the GridControl is valid.

Sanjit Roy
Replied On February 2, 2006 05:51 PM UTC

Stanley, I think i figured out what the problem was. It had to do with implementing the eventhandling in another objects method, which had the GridControl passed to it as parameter. I was able to modify your sample to use the gridRangeStyle approach i had in my code and noticed that it does gets invoked once. I''ve modified my code appropriately and it behaves correctly now. Thank you for your help and in providing me with the sample. Regards, Sanjit

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

;