How to get Datarow from GridTableCellStyleInfoEventArgs

Hi,

I am using Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl (v6.3.0.6) like in the IBindingList_2005 sample (using an Array as DataSource). Depending on additional information in my "Data"-class I want to change the CellType. How can I read the current item from my array in the QueryCellStyleInfo-event?

Regards,
Christian


3 Replies

CL Christian Lützenkirchen July 14, 2008 07:40 AM UTC

... I will open a Direct Track ...



SR Sri Rajan Syncfusion Team July 14, 2008 10:02 AM UTC

Hi Christian,

Thank you for your interest in Syncfusion products.

Please refer the below code to get the current item from the ArrayList in QueryCellStyleInfo event.

void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
//datasource is the ArrayList. Code to get the Current Item in the ArrayList.
Console.WriteLine(dataSource[dataSource.Count - 1].CategoryID + " , " + dataSource[dataSource.Count - 1].CategoryName + " , " + dataSource[dataSource.Count - 1].Description);
//Code to get the Current Item in the GridGroupingControl.
Console.WriteLine(e.Style.Text);
}


Please let me know if this helps.

Best Regards,
Srirajan.



SR Sri Rajan Syncfusion Team July 14, 2008 10:28 AM UTC

Hi Christian,

Thank you for your interest in Syncfusion products.

Please refer the below code to get the current item from the ArrayList in QueryCellStyleInfo event.

void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
//datasource is the ArrayList. Code to get the Current Item in the ArrayList.
Console.WriteLine(dataSource[dataSource.Count - 1].CategoryID + " , " + dataSource[dataSource.Count - 1].CategoryName + " , " + dataSource[dataSource.Count - 1].Description);
//Code to get the Current Item in the GridGroupingControl.
Console.WriteLine(e.Style.Text);
}


Please let me know if this helps.

Best Regards,
Srirajan.


Loader.
Up arrow icon