我的Web应用程序中有一个以编程方式绑定到数据的listview控件. 由于它是通过程序绑定的,因此我没有内置的对列排序的支持. 我正在使用linkbutton作为列标题名称,并且如果用户单击它却想找到一种实现它的方法,则希望对asc/desc进行排序. 请让我知道实现此功能的方法. 谢谢, Vasanth
Hi, I have a listview control in my webapplication that is programmatically bound to data. Since it is programmatically binded, i don''t have built in support for sorting columns. I am using linkbutton as column header name and want to sort asc/desc if user clicks on it but not finding a way to achieve it. Please let me know the way to achieve this functionality. Thanks, Vasanth
推荐答案为什么您认为程序绑定的列表视图不支持排序? 你能行的.像这样的东西: Why do you think that sorting is not supported for programmatically binded listview? You can do it. Something like: ListView1.Sort("Name", SortDirection.Ascending);
在链接"按钮上单击时,使用排序表达式".在这里查看详细信息: ListView.Sort方法 [ ^ ]
On Link button clicks, use the Sorting Expression. Look here for details: ListView.Sort Method [^]
更多推荐
以编程方式设置数据源时对listview列进行排序
发布评论