-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: scorpion_arjun
Message 1 in Discussion
Hello i a having problems in datagrid : This is my procedure to be executed to get
the existing values in the textboxes when the edit button is clicked , since i need
these values in order to execute my update command. but how do i capture the old
values ?? sub dg_edit(obj as object,e as DataGridCommandEventArgs)
Response.write("Edit Mode") dg.EditItemIndex = e.Item.ItemIndex dg.Databind()
response.write(dg.edititemindex) dim index as integer=e.Item.ItemIndex if index > 0
then response.write("Inside if : After getting index value - Index is :")
response.write(index) 'Dim aTextBox As TextBox aTextBox =
CType(e.Item.Cells(1).Controls(0), TextBox) dim inte as integer=aTextBox.text
response.write("Edit Values : ") response.write(inte) end if response.write("Outside
if : After getting index value - Index is :") response.write(index) end sub my
table name is "head" and thee are 4 attributes -
designation(text),internal(integer),off_ph(text) and email(text) and after this i need
the new values in order to execute the update command. sub dg_update(obj as
object,e as DataGridCommandEventArgs) Dim aTextBox,btextbox,ctextbox,dtextbox As
TextBox aTextBox = CType(e.Item.Cells(1).Controls(0), TextBox) bTextBox =
CType(e.Item.Cells(2).Controls(0), TextBox) cTextBox =
CType(e.Item.Cells(3).Controls(0), TextBox) dim inte as integer=aTextBox.text dim
off_phone as integer=bTextBox.text dim emailid as string=cTextBox.text
response.write("Values : ") response.write(inte) response.write(off_phone)
response.write(emailid) ds.Tables("head").Rows(e.Item.ItemIndex)("internal") = inte
ds.Tables("head").Rows(e.Item.ItemIndex)("off_ph") = off_phone d
s.Tables("head").Rows(e.Item.ItemIndex)("email") = emailid dg.EditItemIndex = -1
dg.databind() end sub sone one plzzzzz hel[p. it is very urgent !! Thank you.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]