[英]How to get the updated datagrid after removing the filter for datagrid in c#?
I have a datagridview with 5 columns and each column has a dropdown so that user can filter the data for each column. 我有一个包含5列的datagridview,每列都有一个下拉列表,以便用户可以过滤每列的数据。 I also have "Clear Filetr" link, where user can remove the filter after sorting.
我也有“ Clear Filetr”链接,用户可以在排序后删除过滤器。 Whenever I am make some changes in the datagridview, then if i apply Clear filter, the original datagridview is displayed and the changes are not updated.
每当我在datagridview中进行一些更改时,如果我应用Clear filter,则会显示原始datagridview,并且更改不会更新。 How can I get the updated Datagridview after clicking on "Clear Filter"
单击“清除过滤器”后,如何获取更新的Datagridview
I have used 我用过
"Datagridview.RefreshEdit()";
But I am not getting exact result. 但是我没有得到确切的结果。
one way to solve this problem is to write a method where you set all the values of your datagrid to the starting data. 解决此问题的一种方法是编写一种方法,在该方法中,将datagrid的所有值设置为起始数据。 After clicking the "Clear Filter" your grid should be fine!
单击“清除过滤器”后,您的网格应该就可以了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.