2014-12-02 67 views
0

我有一個命令在我的GridView中。避免回發命令字段

<asp:CommandField ShowEditButton="true" ShowDeleteButton="true" 
       EditImageUrl="~/Icons/1414412214_edit.png" EditText="Edit" 
       DeleteImageUrl="~/Icons/1414412198_delete.png" UpdateText="Done" > 
      <ItemStyle Height="10%" Width="10%" /> 
      </asp:CommandField> 

如何停止發回編輯鏈接按鈕,仍然能夠顯示更新並取消點擊鏈接。我知道我可以使用更新面板來做到這一點,我試過它沒有工作?

回答

1

使用更新面板,以避免整頁回發..或嘗試任何jQuery網格插件在您的應用程序。 Using JqGrid in ASP.NET

+0

Bhavik這怎麼可能使用更新面板,因爲我想我的命令字段將更新面板內部完成,但它沒有工作。如果你長了一段時間,那麼請指導我如何在這裏使用更新面板? – 2014-12-02 05:59:01

+1

你可以指定Postback Trigger看看這篇文章http://www.aspsnippets.com/Articles/Assign-PostBack-Trigger-Full-PostBack-for-LinkBut​​ton-inside-GridView-within-AJAX-UpdatePanel-in-ASPNet。 ASPX – 2014-12-02 06:04:14