C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Tips » Visual Studio »

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


Posted Date: 10 Jul 2009    Resource Type: Tips    Category: Visual Studio
Author: Amzad HossainMember Level: Bronze    
Rating: 1 out of 5Points: 2



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];
}



Responses

Author: Rabiya    17 Jul 2009Member Level: Gold   Points : 0
Where are you removing the first row??


Author: Shunmuganathan M    17 Jul 2009Member Level: Diamond   Points : 0
I dnot understand ... the code.. Please give it little bit details


Author: Amzad Hossain    19 Jul 2009Member 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.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Starting from 2nd row of a data table  .  Removing 1st row from data table  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Creating Alias name for namespace
Previous Resource: Method to reverse the string
Return to Discussion Resource Index
Post New Resource
Category: Visual Studio


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use