Gridview EditItemTemplate Textbox 1_TextChanged event

Posted by Vanchi050585 under ASP.NET on 6/9/2010 | Views : 5896 | Status : [Member] | Replies : 4
hi everybody,

i have textbox1 in the Gridview1 edititemTemplate. i want assign the value to the Textbox1 in the Textbox 1_TextChanged event. i dont know how to identify the Textbox2 and how to assign that in this place. pls send the coding.


Thanks

Thanks
tvn



Responses

Posted by: Vuyiswamb on: 6/9/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
use

 Textboxt parLbl = (Textbox)Parent.FindControl("textbox1");


to get the Textboxt value

Thank you for posting at Dotnetfunda
[Administrator]

Vanchi050585, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hemu on: 6/9/2010 [Member] Starter

Up
0
Down
html code:

grid view properties:

<edititemTemplate>
<asp:textbox runat="server" name="Textbox1">
</edititemTemplate>

like this

code behind:

TextBox Textbox1=(TextBox)Gridview1.Rows[e.RowIndex].FindControl("Textbox1");


Thank u,
Regards,
L.HEMACHANDRAN.

Vanchi050585, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vanchi050585 on: 6/9/2010 [Member] Starter

Up
0
Down
hai friend,

it will through the following error

Thanks
tvn

Vanchi050585, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vanchi050585 on: 6/9/2010 [Member] Starter

Up
0
Down
hai friend,

it will through the following error


i write this in Textbox1_TextChanged event of edititemTemplate

Thanks
tvn

Vanchi050585, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response