The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
I''d missed out to mention that i''m using Syncfusion Essential Studio 4.1.0.50 and Visual Studio 2003.
STstanleyj Syncfusion Team 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
SRSanjit RoyFebruary 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.
SRSanjit RoyFebruary 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