5
पर पूर्ण पोस्टबैक न करने के लिए OnRowCommand
OnRowCommand
ईवेंट की आवश्यकता है। तो मैं एक अद्यतन पैनल में नियंत्रण लपेटा जाता है और OnRowCommand
के लिए एक AsyncPostBackTrigger
कहा:अपडेट पैनेल ट्रिगर: 'ऑनरो कॉमांड' नामक एक ईवेंट नहीं मिला,
<asp:GridView ID="DataSourceMappingGridView" runat="server" DataKeyNames="Index" ClientIDMode="Static" OnRowCommand="DataSourceMappingGridView_RowCommand" OnRowDataBound="DataSourceMappingGridView_RowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:UpdatePanel ID="ErrorUpdatePanel" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DataSourceMappingGridView" EventName="OnRowCommand" />
</Triggers>
<ContentTemplate>
<asp:LinkButton ID="ErrorTextLinkButton" CommandName="Errors" CommandArgument='<%#Bind("Index") %>' runat="server" Text='View Errors' />
</ContentTemplate>
</asp:UpdatePanel>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
लेकिन मैं निम्नलिखित त्रुटि मिलती है:
Could not find an event named 'OnRowCommand' on associated control 'DataSourceMappingGridView' for the trigger in UpdatePanel 'ErrorUpdatePanel'.