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.
Unfortunately, activation email could not send to your email. Please try again.

Databound Grid sorting/filter current position behavior

Thread ID:

Created:

Updated:

Platform:

Replies:

8921 Nov 26,2003 01:34 PM Nov 26,2003 02:02 PM Windows Forms 1
loading
Tags: GridControl
Ben
Asked On November 26, 2003 01:34 PM

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

Administrator [Syncfusion]
Replied On November 26, 2003 02:02 PM

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());

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;