G
Guest
I have a gridview with a textbox in an ItemTemplate, as below. The
OnTextChanged event fires okay but how do I pass a parameter to it, I get an
error when I try "OnTextChanged(""SomeData"")". I would also like to pass
in the value of column 1. I would also like to be able to get the row the
user is on when this event fires. Thank you for your help.
<asp:GridView ID="gv" />
<Columns>
<asp:BoundField DataField="Col1" HeaderText="Column 1"/>
<asp:TemplateField HeaderText="Column2">
<ItemTemplate>
<asp:TextBox ID="txt" OnTextChanged="OnTextChanged"
Autopostback=true Columns=15 runat="server" Text='<%# Bind("Column2Data")
%>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
Protected Sub OnTextChanged(ByVal sender as Object, ByVal e as EventArgs)
'some procedures here
End Sub
OnTextChanged event fires okay but how do I pass a parameter to it, I get an
error when I try "OnTextChanged(""SomeData"")". I would also like to pass
in the value of column 1. I would also like to be able to get the row the
user is on when this event fires. Thank you for your help.
<asp:GridView ID="gv" />
<Columns>
<asp:BoundField DataField="Col1" HeaderText="Column 1"/>
<asp:TemplateField HeaderText="Column2">
<ItemTemplate>
<asp:TextBox ID="txt" OnTextChanged="OnTextChanged"
Autopostback=true Columns=15 runat="server" Text='<%# Bind("Column2Data")
%>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
Protected Sub OnTextChanged(ByVal sender as Object, ByVal e as EventArgs)
'some procedures here
End Sub