使用未绑定列对gridview进行排序(即autogeneratecolumns =" false") [英] Sorting a gridview with unbound column (i.e autogeneratecolumns="false")
本文介绍了使用未绑定列对gridview进行排序(即autogeneratecolumns =" false")的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经有一个表格,我将autogeneratedcolumns设置为false并允许输入为true。此外,我有一个onsorting创建的事件,现在当我运行时,标题链接不能像autogeneratedcolumns设置为true时那样可以点击。因此,事件不会被触发。
我尝试过:
I already have a table in place where I have set the autogeneratedcolumns to false and allowsorting to true. Furthermore, I have an event created onsorting, now when I run, the header links are not clickable like the ones you have when autogeneratedcolumns is set to true. Hence the event onsorting is not getting triggered.
What I have tried:
AllowPaging="True"
PageSize="20"
CssClass="mGrid"
AllowSorting="True"
OnSorting="propertySearchDataGrid_Sorting"
PagerStyle-CssClass="pgr"
AlternatingRowStyle-CssClass="alt"
AutoGenerateColumns="False"
我的设置如上。
My settings are as above.
推荐答案
我得到了解决方案,我忘了把
I got the solution, I forgot to put the "
SortExpression
放在我的代码中。
这篇关于使用未绑定列对gridview进行排序(即autogeneratecolumns =" false")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文