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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

why do i get my CurrentElement =null is ggc

Thread ID:





56402 Feb 14,2007 03:12 PM UTC Feb 14,2007 07:12 PM UTC WinForms 1
Tags: GridControl
Shachar Shimshon
Asked On February 14, 2007 03:12 PM UTC

hi all.
in the ggc_TableControlCellClick if the user clicked on the GroupCaptionCell, i try to get the 'Category' Value like this:
BUT - somethimes the CurrentElement is null.

Administrator [Syncfusion]
Replied On February 14, 2007 07:12 PM UTC

Hi Shankar,

You can use the below code snippet to get the group category name in a TableControlCellClick event.

private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
GridTableCellStyleInfo style = e.TableControl.Model[e.Inner.RowIndex,e.Inner.ColIndex] as GridTableCellStyleInfo;
if( style.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell)
GridCaptionRow row = style.TableCellIdentity.DisplayElement as GridCaptionRow;
if( row != null && row.ParentGroup != null )
Console.WriteLine( row.ParentGroup.Category );

Please refer to attached sample for more details.

Best regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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