MS
Murali Samanthapudi
June 27, 2008 04:11 PM UTC
Hi Robert,
Thank you for using our libraries.
Inside QueryCellStyleInfo, you can get the underlying record object directly from the TableCellIndentity. You do not have to find indexes and then index another collection to get the record object. Here is some code showing how you can use the TableCellIdentity to get at the underlying data.
void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
GridRecord record = e.TableCellIdentity.DisplayElement.GetRecord() as GridRecord;
if (record != null)
{
//to get the raw dataobject, ie the DataRowView from a DataTable datasource
//you can use
object data = record.GetData();
DataRowView drv = data as DataRowView;
if (drv != null)
{
//Console.WriteLine("field0={0} field1={1}", drv[0], drv[1]);
}
}
}
Please let us know if this is not the information you needed.
Regards,
Clay Burch
AD
Administrator
Syncfusion Team
June 27, 2008 04:12 PM UTC
That is exactly what I needded. Thanks!