根据网格中的下拉列表选择的值过滤数据 [英] To filter data based on dropdown list selected value in a grid

查看:77
本文介绍了根据网格中的下拉列表选择的值过滤数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个gridview,在这里我向您显示存储在特定表和网格的列部分中的所有数据,我有一个带有下拉列表的模板字段,我需要在该字段中绑定该特定列的表格和之后的不同值选择任何项目我只希望下拉列表中选择的那些项目的详细信息,即我想使用下拉列表中选择的选项通过使用dataview和grid row databound事件来过滤gridview ...我不想使用数据源控件将其绑定.任何人都可以帮我解决这个问题吗?
谢谢

hi all,

I have a gridview where i show you all the the data stored in a particular table and in columns section of grid i have a template field with drop down list to which i need to bind the distinct values from the table of that particular column and upon selecting any item i want the details of only those which are selected in the drop down list i.e i want to filter the gridview using the option selected in the drop down list by using dataview and grid row databound event...I do not want to bind it using data source control..Could anybody help me out with this...
Thanks

推荐答案

在选定的索引已更改的下拉事件中,根据条件获取记录,然后再次绑定网格.将grid的autopostback属性设置为true.
In selected index changed event of dropdown get the records based on condition and then once again bind the grid. set autopostback property of grid to true.


您好,您可以尝试此链接....

http://csharpdotnetfreak.blogspot.com/search/label/DropDownList?max-results=5 [^ ]
Hi, You try this link....

http://csharpdotnetfreak.blogspot.com/search/label/DropDownList?max-results=5[^]


这篇关于根据网格中的下拉列表选择的值过滤数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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