2013-11-04 6 views
5

पर पूर्ण पोस्टबैक न करने के लिए OnRowCommandOnRowCommand ईवेंट की आवश्यकता है। तो मैं एक अद्यतन पैनल में नियंत्रण लपेटा जाता है और 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'.

उत्तर

11

घटना RowCommand कहा जाता है नहीं OnRowCommand

बदलें

EventName="OnRowCommand" 
EventName="RowCommand" 

साथऔर यह

काम करना चाहिए
संबंधित मुद्दे