清除Datagridview [英] To clear Datagridview
本文介绍了清除Datagridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想显示一些有关DateTimePicker
中所选日期的账单.当我选择下一个日期时,与该日期相对应的帐单应显示在DataGridView
中.但是它正在被附加.
我试过了:
I want to display some bill with respect to the selected date in DateTimePicker
. When I select the next date, the bill corresponding to that date should be displayed in a DataGridView
. But it is getting appended.
I tried this:
datagridview.DataSource = null;
但这不起作用.
请帮助,紧急.
But it is not working.
Please help, urgent.
推荐答案
尝试一下…….
((DataView)dataGridView1.DataSource).Table.Clear()
try this................
((DataView)dataGridView1.DataSource).Table.Clear()
清除datagridview的行
Clear the rows of datagridview
dataGridView1.Rows.Clear();
希望这可以帮助您.....:)
Hope this may help u ..... :)
这篇关于清除Datagridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文