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. Image for the cookie policy date

How to capture grid celltype events.

Hi,
1. Some of my grid's column is check box.
How do i get the checked/unchecked events of this check box.
Is it possible to get the control inside a cell.

2. Is there a RowAdded or RowInserted event in syncfusion grid?





3 Replies

MS Mohamed Suhaib Fahad A. Syncfusion Team March 19, 2009 09:55 AM UTC

Hi Vijay,

Thanks for using Syncfusion products.

1) As of now, we don't have events raised inside the GridCellRenderer's for you to listen. However, you can check thru the StyleInfo as follows,

this.grid.Model[0,1].Changed += OnStyleChanged;

void OnStyleChanged(object sender, Syncfusion.Windows.Styles.StyleChangedEventArgs e)
{
var styleInfo = sender as GridStyleInfo;
if (e.Sip == GridStyleInfoStore.CellValueProperty)
{
var checkedValue = styleInfo.CellValue;
}
}

2) Is it possible to get the control inside a cell?

The grid loads the UIElement (i.e control) on demand, it has its own architecture that follows this. Hence you might find difficulty in getting the control instance instantiated always. The best way for you is to create a custom CellRenderer and have your logic placed inside that itself, In that way you can easily work without any problems.

3) RowAdded or RowInserted event?

Yes, we do have a RowsInserted routed event. You can check with our latest refresh build that is published in our website.

http://www.syncfusion.com/downloads/latestversion/default.aspx

Please let me know if you want any more details.

Thanks,
Fahad
Grid.WPF Team
Syncfusion Inc.,



VI Vijaylal March 20, 2009 06:56 AM UTC

Thanks Fahad,

I made it work by making use of datatemplate.

I have got a major issue now,
My application is crashing when i am removing columns from the grid. From the out put window i got an exception message like "A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in Syncfusion.GridCommon.WPF.dll".

Do i need to take care of anything while frequently adding and removing columns from syncfusion grid?

Thanks,
Vijay.

I not able to handle this exception.



MS Mohamed Suhaib Fahad A. Syncfusion Team March 20, 2009 08:41 AM UTC

Hi Vijay,

I guess you are using Model.RemoveColumns, I checked it out with a simple sample and it works for me.

Can you please send me your sample, I would like to check it out and see where the issue occurs.

Thanks,
Fahad
Grid.WPF Team
Syncfusion Inc.,


Loader.
Live Chat Icon For mobile
Up arrow icon