如何以编程方式从DataGrid中选择行ID列=文本框值中的ID [英] How to programmatically select row from DataGrid where ID in Column ID = textbox value

查看:82
本文介绍了如何以编程方式从DataGrid中选择行ID列=文本框值中的ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



是否可以通过编程方式从DataGird中选择UserControl上的列ID = ID(来自UserControl上的textbox txtIMID.text)?



提前谢谢

解决方案

请阅读我对这个问题的评论。



据我所知,你可以通过支持过滤的 ICollectionView 过滤DataGrid的项目。请看这里:如何:对数据进行分组,排序和过滤DataGrid控件 [ ^ ]

Hi all,

Is it possible to programmatically select row from DataGird where Column ID = ID (from textbox txtIMID.text on UserControl) on UserControl load?

Thank you in advance

解决方案

Please, read my comment to the question.

As far as i know, you can filter the the DataGrid' items through the ICollectionView which supports filtering. Have a look here: How to: Group, Sort, and Filter Data in the DataGrid Control[^]


这篇关于如何以编程方式从DataGrid中选择行ID列=文本框值中的ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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