使用下拉列表的数据网格过滤器

编程入门 行业动态 更新时间:2024-10-10 14:24:41
本文介绍了使用下拉列表的数据网格过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我想将下拉列表列保留在标题的模板字段中,并希望根据数据网格中标题列的下拉列表中选择的选项来过滤数据.但不是单行过滤, 它位于标题上,我需要在不使用数据源控件的情况下针对网格中的单个列过滤数据.

Hi all, I want to keep dropdown list column in the template field of a header and would like filter the data based on the options selected in the dropdown list of header column in the data grid..but not single row filtering, Its on the header where i need to filter the data with regard to a single column in the grid without using data source control.

推荐答案

您好朋友 您需要此更改 1)在标题下拉菜单中设置autopostback属性= true 2)生成该下拉事件的SelectedIndexChanged事件 3)在这种情况下,您必须编写代码以过滤数据,然后将数据重新分配到网格以重新绑定它,并且输出将是网格数据,因为下拉菜单会更改索引 我希望这就是你想要的. 如果您满意,请不要忘记接受ans作为解决方案并对我的ans评分.. Hello friend you need this changes 1) set the autopostback property = true in header drop down 2) generate a SelectedIndexChanged event of that drop down event 3) in that event you have to write your code that will filter your data and that data will be reassign to your grid to re bind it and the out put is your grid data will be filtered as per your drop down will change the index i hope this is what you want..?? if you satisfied please don''t forgot to accept ans as solutions and also rate my ans..

更多推荐

使用下拉列表的数据网格过滤器

本文发布于:2023-11-23 03:08:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1619849.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网格   过滤器   数据   列表

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!