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...






Forums » .NET » .NET »

How to get last row of datatable


Posted Date: 03 Nov 2009      Posted By: Umar      Member Level: Gold     Points: 1   Responses: 2



hello friends
my records come in datatable then i want to fetch the last record of that datatable
can anybody tell me any property or ideas of that
please tell me
how can i fetch last row of datatable

Thanks & Regards
Umar Daraj
umardaraj07@gmail.com
Software Engineer(Jaipur)





Responses

Author: Reach2Shaik    03 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Hi,

Try this

DataRow dr = dataTable.Rows[dataTable.Rows.Count - 1];


Don't forget to rate this answer, if it is helpful...
Regards Shaik



Author: Anuraj    03 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Try this

DataRow dataRow = dataTable.Rows[dataTable.Rows.Count - 1];


Thanks
Anuraj
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS.
BEWARE OF BUGS IN THE ABOVE CODE; I HAVE ONLY PROVED IT CORRECT, NOT TRIED IT.
dotnetthoghts



Post Reply
You must Sign In to post a response.
Next : SEt default Location for file
Previous : What is meant by virtual string
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use