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
close icon

Finding the System.Data.DataTable object bound to a GridTableDescriptor

Hi,

If I have a GridTableDescriptor object, how can I find out the specific System.Data.DataTable reference that it is bound to?

Thanks,
Scott

1 Reply

AD Administrator Syncfusion Team August 14, 2006 06:01 AM UTC

Hi Scott,

You can access the Related DataTable for TableDescriptor using GridTable.SourceList property. Please find the code snippet below

GridTableDescriptor gtd = this.gridGroupingControl1.GetTableDescriptor("TableName") as GridTableDescriptor;

GridTable gt = this.gridGroupingControl1.GetTable(gtd.Name);

DataView dv = gt.SourceList as DataView;
Console.WriteLine( "Table Name : " + dv.Table.TableName );

Let me know if this helps.
Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon