Datagrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I Have a values in a datagrid. I want to edit the values in a datagrid
(Say Company="Techgene" which is primary key). Before Update the selected
Record I have to get the Orignal VAlue . Based on this, I can updated the new
value.


My Problem is how can i get the value in the datagrid?


ANY BODY PLEASE HELP ME, TIA
 
[assuming the datagrid is structurally static]

in the datagrid.updatecommand handler you can access the info :


ctype(e.item.cells(x).controls(0), textbox).text

where x is the 0 based column index of the cell you are attempting to gather
info out of

code will cast the control in that cell to a textbox, then return the text
property of said textbox....
that's the value for the update....

for the original value, gather that info in the datagrid.editcommand handler
with the same text
 
Thanks For Ur reply.

I have to get the Old Values before Update Button Press. For that I
need to get the Values when i Press Edit Button.

Even I try your Solutions, For that I get an error Like "cast Exception"


Thnak you

James said:
[assuming the datagrid is structurally static]

in the datagrid.updatecommand handler you can access the info :


ctype(e.item.cells(x).controls(0), textbox).text

where x is the 0 based column index of the cell you are attempting to gather
info out of

code will cast the control in that cell to a textbox, then return the text
property of said textbox....
that's the value for the update....

for the original value, gather that info in the datagrid.editcommand handler
with the same text


VIJAY KUMAR said:
Hi,

I Have a values in a datagrid. I want to edit the values in a datagrid
(Say Company="Techgene" which is primary key). Before Update the selected
Record I have to get the Orignal VAlue . Based on this, I can updated the new
value.


My Problem is how can i get the value in the datagrid?


ANY BODY PLEASE HELP ME, TIA
 
Back
Top