Databound Grid sorting/filter current position behavior

I''m looking for some clarification on how the filter bar and sort capabilities of a Grid Data Bound Grid affect the underlying datasource and dataset. If I want to access the dataset row displayed in a grid after performing a sort or filter which method/property will accurately reflect the changes. I have currently been trying to access the index for the row in the dataset through the Grid Binder. Thanks for the help. Ben

1 Reply

AD Administrator Syncfusion Team November 26, 2003 07:02 PM UTC

You need to go through the CurrencyManager to get the datarow in a datatable that has been sorted or filtered. Here are some snippets. CurrencyManager cm = (CurrencyManager) this.BindingContext[this.gridDataBoundGrid1.DataSource, this.gridDataBoundGrid1.DataMember]; DataRowView drv = (DataRowView) cm.List[gridRowIndex]; DataRow dr = drv.Row; Console.WriteLine(dr["Col2"].ToString());

Loader.
Up arrow icon