How to retrieve other rows except 1st row from a data table.

Some times we need to work with rows removing 1st row of a data table that is returned by a method by querying from database. Hear is the code.


DataTable dt=GetDataTable();//Method that return data table
int countRow=dt.Rows.Count;
if (countRow== 0)
{
//Show a valid message
return;
}
int i=0;
for(i=1; i < countRow; i++)
{
//assign the row as you need
dt.Rows[i];
}


Comments

Author: Spidy17 Jul 2009 Member Level: Gold   Points : 0

Where are you removing the first row??

Author: Nathan17 Jul 2009 Member Level: Gold   Points : 0

I dnot understand ... the code.. Please give it little bit details

Author: Amzad Hossain19 Jul 2009 Member Level: Bronze   Points : 1

Dear all
Actually not removing, working with rows except 1st row. Title of the tips has already been corrected. thanks for ur response.



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: