Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
<asp:UpdatePanel runat="server" ID="pnlGrid" UpdateMode ="conditional">
<ContentTemplate >
 <asp:GridView ID="gdvEntity" runat="server" AutoGenerateColumns="False" 
        onrowcommand="gdvEntity_RowCommand" 
        onselectedindexchanged="gdvEntity_SelectedIndexChanged" 
    OnRowDeleting="gdvEntity_RowDeleting" OnRowEditing="gdvEntity_RowEditing">
<Columns >
<asp:BoundField DataField="ORG_ENTITY_ID" HeaderText="" Visible="false"  />
:
:
<asp:ButtonField ButtonType="Button" CommandName="Edit" Text="Edit" HeaderText="Edit"  />
 
</Columns>
</asp:GridView><telerik:RadTextBox ID="txttest" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>


I want that when I click on GridView's Button(Button Field) contents of another UpdatePanel should be refreshed.

Here is my another UpdatePanel

XML
<asp:UpdatePanel runat="server" ID="pnlEntityData" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Edit" EventName="Click" />
</Triggers>



Problem is that ,I am using ButtonField to refresh this panel.I dont have ControlID & EventName for ButtonField
Posted
Updated 17-Feb-10 3:38am
v5

1 solution

You can handle the click event of the Command button using GridView.RowCommand Event. This event cccurs when a button is clicked in a GridView control.

Set the CommandName property of the Button control to a string value and check that value with GridViewCommandEventArgs in the RowCommand event of GridView. Check the following link.

GridView..RowCommand Event[^]
 
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