C# .NET - How to Select Top1 Row from Dataset - Asked By Ajay Paritala on 21-Nov-12 09:21 AM

Hello,

Can someone help me!

How to select Top1 Row from a Dataset in c#.net ?


hariharan v replied to Ajay Paritala on 22-Nov-12 12:07 AM
var Temp = MyDataSet.Tables[0].AsEnumerable().Take(1).CopyToDataTable();

GridView1.DataSource = Temp;

GridView1.DataBind();