I try to use the update panel with my datagridview on the rowcommand event to show a dialog box. when i remove the the update panel it works fine , but withit it does not work.
I tried it the following configuration with the update panel, but it does not work.
<asp:UpdatePanel ID="UpdatePaneldgv" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<Triggers >
<asp:AsyncPostBackTrigger ControlID="dgvVehiclesType" EventName ="RowCommand" />
</Triggers>
<ContentTemplate>
<div class="tab-content">
<div class="tab-pane fade in active">
<asp:GridView ID="dgvVehiclesType" runat="server" GridLines="None" OnRowCommand="dgvVehiclesType_RowCommand" PageSize="10">
<Columns>
<asp:BoundField DataField="OptionID" HeaderText="# ID" ReadOnly="True"/>
<asp:BoundField DataField="OptionName" HeaderText="Name" ReadOnly="True" />
<asp:ButtonField ButtonType="Image" CommandName="cmdEdit" ImageUrl="~/img/view.png" />
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
Rowcommand back end event
switch (e.CommandName)
{
case "cmdEdit":
// show form
ClientScript.RegisterStartupScript(GetType(), "Show", "<script> $('#formModal').modal('toggle');</script>");
break;
default:
break;
}
any suggestion ?? or reference