Home All Groups Group Topic Archive Search About

Retrieving values from DataGrid row before they are changed

Author
5 Jul 2005 10:11 PM
greenb
I have an editable datagrid and need to retrieve the values of the cells
before they are changed.  I tried to read the text values from the cells in
the ItemCommand event and the OnEdit event but they are always empty strings.
Does anyone know the best way to do this?

All the other datagrid functionality is working correctly (edit, update,
delete, and paging).

Thanks for your help.

Author
6 Jul 2005 1:33 PM
Michael Baltic
On the client side, if you can determine the id of the cell you are about to
edit, you can use getElementById to determine the value before you edit it. 
The ASP:DataGrid doesn't have this functionality built in by default.  A 3rd
party grid would have a full client side object model that you can access
(Infragistics, ComponentOne).

On the server side, you would need to find the cell you are about to edit in
the databound grid, not the eventargs that are being passed to your function.
--
Staff Consultant II
Enterprise Web Services
Cardinal Solutions Group

Future Business Model
Loan Origination Services
National City Mortgage


Show quoteHide quote
"greenb" wrote:

> I have an editable datagrid and need to retrieve the values of the cells
> before they are changed.  I tried to read the text values from the cells in
> the ItemCommand event and the OnEdit event but they are always empty strings.
>  Does anyone know the best way to do this?
>
> All the other datagrid functionality is working correctly (edit, update,
> delete, and paging).
>
> Thanks for your help.
>
>
>
>