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

loop through columns

Thread ID:





28984 May 13,2005 11:19 AM UTC May 13,2005 01:21 PM UTC WinForms 1
Tags: GridControl
Hrvoje Voda
Asked On May 13, 2005 11:19 AM UTC

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 01:21 PM UTC

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.

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