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.

loop through columns

Thread ID:





28984 May 13,2005 07:19 AM May 13,2005 09:21 AM Windows Forms 1
Tags: GridControl
Hrvoje Voda
Asked On May 13, 2005 07:19 AM

How can I get a values that I entered into column through dataset? I have a column with User names. I would like to loop through that names to find a specific name.

Administrator [Syncfusion]
Replied On May 13, 2005 09:21 AM

If you want to loop directly though the datatable, you loop through the datatable1.Rows collection that contains DataRow objects. given a DataRow, dr, you get a particular column value by indexing it with teh column name.
for(int i = 0; i < dt.Rows.Count; ++i)
   DataRow dr = dt.Rows[i];
   string val = dr["ColumnName"].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.

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.