GridView的排序事件不点火 [英] GridView Sorting event is not firing

查看:111
本文介绍了GridView的排序事件不点火的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GridView的排序和分页的作品很好,当我设置EnableSotringAndPagingCallbacks为false。
 然而,当我将它设置为true排序不会触发事件(分页正常工作)。

GridView Sorting and Paging are works fine when I set EnableSotringAndPagingCallbacks to false. however when I set it to true the sort event does not fire (the paging works fine).

什么想法?

推荐答案

这其实是正确的行为。

在默认情况下,当一个排序或分页
  执行操作时,GridView
  控件回发到服务器
  执行操作。当。。。的时候
  EnableSortingAndPagingCallbacks
  属性设置为true,则服务
  所谓在客户端上执行
  排序和分页操作,
  无需回发到
  服务器

By default, when a sorting or paging operation is performed, the GridView control posts back to the server to perform the operation. When the EnableSortingAndPagingCallbacks property is set to true, a service is called on the client to perform sorting and paging operations, which eliminates the need to post back to the server.

阅读更多:<一href=\"http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.enablesortingandpagingcallbacks.aspx\" rel=\"nofollow\">http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.enablesortingandpagingcallbacks.aspx

这篇关于GridView的排序事件不点火的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆