Commande OnRowcommand d'un gridview dans un updatepanel
Bonjour,
Je rencontre actuellement le souci suivant :
J'ai une gridview à l'intérieur d'un updatepanel . Sur cette gridview j'ai un Onrowcommand defini dans mon code behind. Cependant je suis obligé de cliquer deux fois pour que le code de l'OnRowCommand se fasse.
Je souhaiterai que le code se déroule dès le premier clic.
Voici le code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="GridView_formations" runat="server" AutoGenerateColumns="False"
DataKeyNames="ID_Formation" onrowcommand="GridView_formations_RowCommand"
CellPadding="4" Width="500px">
<Columns>
<asp:BoundField DataField="RefFormation" HeaderText="Ref"
SortExpression="RefFormation" />
<asp:BoundField DataField="TitreFormation" HeaderText="Titre"
SortExpression="TitreFormation" />
<asp:ButtonField CommandName="inscription" HeaderText="Inscription" Text="Inscription" />
</Columns>
</asp:GridView>
</ContentTemplate> |