GGC event, TableControlPrepareViewStyleInfo

Hi, how do I determine in the tablecontrolPrepareViewStyleInfo Event if a row is collapsed or expanded?


1 Reply

JJ Jisha Joy Syncfusion Team August 28, 2008 06:49 AM UTC

Hi Louis,

We appreciate your interest in SYncfusion Products.

You can use the IsExpanded property to determine whether a particular record is Expanded or Collapsed

Please refer the code:


private void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, GridTableControlPrepareViewStyleInfoEventArgs e)
{
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
GridRecord rec = style.TableCellIdentity.DisplayElement.ParentRecord as GridRecord;
if(rec != null)
{

if (rec.IsExpanded)
{
Console.WriteLine("Expanded");

}

else
{
Console.WriteLine("Collapsed");
}

}
}


Please try this and let me know if this helps.

Regards,
Jisha


Loader.
Up arrow icon