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.

ow to make the CurrenCell the first one aftc a cell in a datagrid witha defaulview.filterrow

Thread ID:




4974 Jun 11,2003 01:29 PM Windows Forms 0
Tags: FAQ
Asked On June 11, 2003 01:29 PM

Hi, I Have a datagrid with a dataview as datasource. I aplied a filter dataview.rowfilter to the dataview and I need to make the CurrenCell the first row that return the filtered dataview. How do I do that. The code: public class mydatagrid : datagrid { ... protected override bool ProcessCmdKey(..... { //*** Dataview myDataview = (DataView) this.Datasource; myDataView.Sort = "productid ASC"; myDataView.RowFilter = ("productid LIKE '1*'"); //How do i get the row number of the rows after //the filter, and make the CurrentCell of the //datagrid the first row after the filter return base.ProcessCmdKey(ref msg,keyData); } }


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.