DataTable dt = ((DataTable)ViewState["dtNewStudents"]);
DataRow[] EditRows = dt.Select("Edit='1'");
for(int i=0; i Less than EditRows.Count(); i++)
{
int index = dt.Rows.IndexOf(EditRows[i]);
dt.Rows[index]["Edit"] = "0";
}
ViewState["dtNewStudents"] = dt;
This Blog is a programing portal, with tutorials and references relating to development subjects, including C#,Silverlight,WCF, Asp.Net,HTML, XML, CSS, JavaScript,Sql, Windows Administration.
Thursday, January 26, 2012
Using DataTable.select function for selecting from datatable
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment