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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Finding a row in GDBG

Thread ID:





38346 Dec 9,2005 10:20 PM UTC Dec 10,2005 12:34 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On December 9, 2005 10:20 PM UTC

Hi How can i find a row in the GDBG for a specified criteria. Thanks Tom

Administrator [Syncfusion]
Replied On December 10, 2005 12:34 AM UTC

The most effiecient way is to directly access the DataSource. Here is some code that assumes you are using a DataTable as the DataSource. If you are using an IList, replace the DataRowView in the code below with the class type of the objects in your list.
CurrencyManager cm = grid.BindingContext[grid.DataSource, grid.Datamember] as CurrencyManager;
int rowIndex = -1;
for(int position = 0; position < cm.List.Count; ++position)
	DataRowView drv = cm.List[position] as DataRowView;
		rowIndex = grid.Binder.PositionToRowIndex(position);
//rowindex is the grid row index where Col1 has 25 in it.


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