I have an ASP.Net GridView, with two columns (“ID” and “name”). The name column is editable via an <asp:TextBox>. What I want to do is have the grid trigger its update event when the user clicks away from an editable cell.
I know I can attach an onBlur event handler to the TextBox to retrieve the value when the user clicks away. However, I don’t know how to trigger the GridView’s update event programmatically through JavaScript. Any suggestions?
On your
TextBoxsetAutoPostBack="True". This will cause a postback when the clientchangeevent fires, which is probably what you want rather thanblur. Attach aTextChangedhandler to the textbox and you can call your grid update method from there.you can get the row index for the textbox that triggered the event like this: