Click here to Skip to main content
15,611,422 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

I have GridView inside UpdatePanel.In that one Asp:Button filed in ItemTempelte. When I will click on Button no event is fired row Command.I know that RowCommand Event is fired for ButtonField. But want to use simple Button.On that Button_click current rows data should show in Textboxes below that GridView But all these textboxes are not inside that UpdatePanel.

<asp:UpdatePanel ID="pnlList" runat="server" > <ContentTemplate>

<asp:GridView runat="server" id="gdvList" AutoGenerateColumn="false">
<asp:Button id="btnEdit" runat="server" text="Edit" commandName="Edit">
</ asp:GridView>
<asp:TextBox ID="txtLogicalCode" Runat="server"></asp:TextBox>

Please tell me solution as early as possible.

Thanks in Advance.
Updated 16-Feb-10 4:12am

First you need to change the CommandName="Select" and then handle SelectedIndexChanged event, after that when you click that button it will fire SelectedIndexChanged

Also you can set the property DataKeyNames="your primary key"

and you will get that key value in the selected index changed event, so that you can perform more operation on it using

Share this answer
try using linkbutton instead of button..

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900