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

Databound Grid sorting/filter current position behavior

Thread ID:





8921 Nov 26,2003 06:34 PM UTC Nov 26,2003 07:02 PM UTC WinForms 1
Tags: GridControl
Asked On November 26, 2003 06:34 PM UTC

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon