471,319 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

how to reset datagridview


I have a dataGridView, textBox, button RESET and label. When I change
text in TextBox the dataGridView is filtering and I see only this date
where text in field "name" is text in TextBox and when I click on the
row, in label I see date from field "name" in checked row.

DataView view = (DataView)this.klienciBindingSource.List;
string str = szukajklienta.textBox1.Text;
view.RowFilter = "nazwa" + " Like '" + str + "%'";
dataGridView1.DataSource = view;

when I push the button RESET I would like to reset the dataGridView to
Default view which all date. How can I to do it. I'm testing this:
DataView view = (DataView)this.klienciBindingSource.List;
view.RowFilter = "";
dataGridView1.DataSource = view.Table.DefaultView;
and it's work but when I checked another row the date in label don't

Thanks for any help.

Feb 8 '06 #1
0 5033

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Henok Girma | last post: by
7 posts views Thread by Mitchell S. Honnert | last post: by
7 posts views Thread by =?Utf-8?B?TG9zdEluTUQ=?= | last post: by
reply views Thread by jeastman - Hotmail | last post: by
3 posts views Thread by Andrus | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.