Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a problem with updating binding source after filtering that binding source.

I have 4 textboxes: txtbox1,txtbox2,txtbox3,txtbox4
3 buttons:btnRefresh,btn,Update,btnDisplay
1 datagrid view:dg
1 txtboxfilter

I have placed code on btnDisplay with binding source that shows all data from datatable threw dataset in dg

txtboxes are used to show the same data as in dg, as I change position in in dg it also shows those chosen values in dg.row in those txtboxes

I use txtboxfilter to filter out txtbox1 and it does that, and when I filter out specific data and want to change it and then do the update on btnUpdate it always changes the first row in dg or dataset better said.

this bugs me a lot

I have used the simple code for filtering

UsersBS.Filter = String.Format("User = \'" + (txtboxfilter.Text + "\'"));

UsersBS is BindingSource, and updating when I manually go threw data with navigations buttons work fine, but when I filter some data and I see those values in txtboxes it doesnt change that data but first

HELP!!!!!
Posted
Comments
Nagy Vilmos 3-May-11 10:40am    
I /think/ that you'll need to put some code up. Can you edit the question please and add the button code to start with.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900