Datagridview数据表作为数据源的问题 [英] Datagridview problems with datatable as datasource

查看:76
本文介绍了Datagridview数据表作为数据源的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI!

我有一个数据网格视图,其中包含一个数据集数据表作为数据源。当我尝试向datatable添加新行时,有时datagridview不显示任何行。当它发生时,它只是从应用程序启动它(表单显示)它我的意思是datagridview从一开始就不显示行,而不是在显示一些之后,其余的没有显示。

我必须关闭应用程序来解决问题。



plz任何建议

HI!
i have a data grid view that has as datasource one data table of dataset. when i try to add a new row to datatable sometimes datagridview is not displaying any rows. when it happens, it does it just from the application startup(form shows) i mean that the datagridview does not display lines from the beginning, not after displaying some and the rest are not being displayed .
I have to close the application to fix the issue.

plz any advice

推荐答案

你有RowFilter设置到数据集以根据ID过滤掉数据。删除过滤器并检查您的显示器。



检查源代码中的这行代码。

You have RowFilter set to the dataset to filter out the data based on ID. remove the filter and check your display.

Check this line of code in your source.
dataset.Tables["BillLinesDt"].DefaultView.RowFilter = "ID = " + id;


这篇关于Datagridview数据表作为数据源的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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