在网格中搜索选项 [英] Searching Option in Grid

查看:117
本文介绍了在网格中搜索选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经通过数据表加载了网格.

现在,我想通过这种情况过滤数据表或网格中的行,


例如Grid具有此值.


Hi All,

I have loaded Grid by a Data table.

Now I want to filter the rows from data table or Grid by this case,


for example Grid has this values.


control
----
 
Drop Down List
Checked List Box
Label Box
File Upload Control
New Print Priview Control



是否应在网格中过滤过滤器字符串下拉列表中的DDL类型

同理,



if Type DDL in filter string Drop Down List should be filterd in Grid

Like wise,

CLB- Checked List Box.
NPPC- New Print Priview Control






该怎么做?


谢谢&问候,
Pal.






How to do this?


Thanks & Regards,
Pal.

推荐答案

您可以添加一列,其中包含未在网格中显示的代码.
然后,当用户在文本框中输入DDL时,将过滤该列上的数据表.

You could add a column with those codes that you do not show in the grid.
Then when the user enters DDL in the textbox you filter the datatable on that column.

DataGrid.DataSource = datatable.Select("ControlCode = " + textbox.text);


嗨..
解决方案1非常正确.
选择ddl或复选框时绑定数据表,以在网格视图中过滤值.

但是,请尝试使用linq来实现对象或使用linq来实现sql

它将最终改善性能,并有助于获得mor功能.

谢谢
Hi..
the solution 1 is very correct.
to bind the data table when we select ddl or check box get filter the values in grid view.

But try to implement same thing using linq to object or linq to sql

it will definatly improve the performance as well as will help to get mor functionality

Thanks


这篇关于在网格中搜索选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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