开发者

how to use the binding source to update the datagrid view

开发者 https://www.devze.com 2023-04-02 08:44 出处:网络
I havedatagird view in description form i am bi开发者_StackOverflownding this datagrid view using binding source...

I have datagird view in description form i am bi开发者_StackOverflownding this datagrid view using binding source...

i have sent the selected row values from description form to another form(order form)....thats fine...

i have done some modifications....in order form now i need to update the datagrid view in descrption form...

I dont how to use the binding source for updating in order form ...

Do i need to pass binding source as a constructor, if so would you pls tell a sample code snippet..

or can i just do like this datagridview1.refresh() ; in order form ...

I am not sure how to do this would any pls help on this...

Many thanks......


I would not pass it in the constructor but i would use a public property of the other form. after that if all your bindings are done correctly you can call refresh in the grid of first form but can also be that you would see the changes immediately. show your bindings.


The following code example demonstrates how to share a BindingSource and its bound data across forms. In this example, the shared BindingSource is passed to the constructor of the child form. The child form allows the user to edit the data for the currently selected item in the main form.


You can have one BindingSource on each form and connect their DataSource to the same underlying list or data set.

0

精彩评论

暂无评论...
验证码 换一张
取 消