Datagrid

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
 
J

James

[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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top