M
_MC_
Hi,
I'm unable to access values in my Datagrid. Datagrid thinks it hase only 1
Cell. So here it is:
The Datagrid is binded in PageLoad, AutoGenerateColumns is false, Columns
are added on PageLoad like this:
BoundColumn Bound_Column = new BoundColumn();
Bound_Column.DataField = name; ( + HeaderText,
SortExpression, Visible)
DataGrid1.Columns.Add(Bound_Column);
DataGrid has all values. Then user edits one Row and clicks on 'Update'.
Eventhandler for Update is called. Now here is my real problem, i could not
access any row. Datagrid tells me that it as 15 Items (Page), but only 1
Cell (Edit Cell i think). I tried to access datarow via:
for (int i = 1; i < 15; i++) // We have 15 Rows... E. g. (as
e.Utem.Cells.Count is 1)
String columnContent = ((TextBox)e.Item.Cells.Controls[0]).Text;
This leads to an Out of Range Exceptions, as Datagrid has only How can i
access the value of the current row?
Thanks for your help,
_MC_
I'm unable to access values in my Datagrid. Datagrid thinks it hase only 1
Cell. So here it is:
The Datagrid is binded in PageLoad, AutoGenerateColumns is false, Columns
are added on PageLoad like this:
BoundColumn Bound_Column = new BoundColumn();
Bound_Column.DataField = name; ( + HeaderText,
SortExpression, Visible)
DataGrid1.Columns.Add(Bound_Column);
DataGrid has all values. Then user edits one Row and clicks on 'Update'.
Eventhandler for Update is called. Now here is my real problem, i could not
access any row. Datagrid tells me that it as 15 Items (Page), but only 1
Cell (Edit Cell i think). I tried to access datarow via:
for (int i = 1; i < 15; i++) // We have 15 Rows... E. g. (as
e.Utem.Cells.Count is 1)
String columnContent = ((TextBox)e.Item.Cells.Controls[0]).Text;
This leads to an Out of Range Exceptions, as Datagrid has only How can i
access the value of the current row?
Thanks for your help,
_MC_