Hello
I'm trying to take Data from my GridView at the moment.
My gridview has a column called 'DataField' what I want to do is take those values from Datafield to calculate the highest value.
The 'Datafield' are as follows: A10, A11, A12 etc.
How can I take those values (A10, A11, A12) and place them into a textbox, or calculate the highest value and put that into a textbox.
My c# code for the DataBind is below:
void binddata()
{
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath(@"xml\" + Request["Gradebook"] + ".xml"));
foreach (DataColumn dc in ds.Tables[0].Columns)
{
dc.ColumnMapping = MappingType.Attribute;
}
DataView dv = new DataView(ds.Tables[0]);
dv.Sort = "SortOrder ASC";
gv.DataSource = dv;
gv.DataBind();
Many thanks!