dataGridView数据记录清晰的问题 [英] dataGridView Problem with clear data records

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

问题描述

您好,有dataGridView的ListBox.Items.Clear()类似物.
因为在两次调用dataGrid时遇到重复记录的问题.

Hello Have ListBox.Items.Clear() analog for dataGridView.
Because I have problem with duplicate records when call dataGrid twice.

推荐答案

Wes是正确的.我相信,您也可以将DataSource设置为null并重新绑定.您是否正在使用datasource属性,因为听起来好像不是,所以设置数据源并调用databind将显示您的新数据并删除旧数据.
Wes is right. You can also set the DataSource to be null and rebind, I believe. Are you using the datasource property, because it sounds like you are not, setting the datasource and calling databind will show your new data and remove the old.


这篇关于dataGridView数据记录清晰的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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