Hi all!
I would like some help for getting a value out of a selected row of a datagrid.
To do this i used the following code but it returns an empty string
(DG is my datagrid)
string val = DG.SelectedItem.Cells[1].Text;
Response.Write("*"+val+:*");
The rouput of this its: **
although there is a value on the cell.
The datagrid is created and filled in the Page_Load when !Page.IsPostBack and the above code is called when a button is pressed.
Does anyone know how to fix this?
Best regards
George