i have 2 typed datasets both bound to different dgv, 1 in form1 other in form 2.
after changing data in grid2 on form2, want grid1 in form1 refreshed.
grid1 created stored procedure on sql-server.
creating everything, used drag & drop , wizards.
have tried putting following code save button in menustrip in dgv2 , putting code load_form of form1:
dataset1.table.clear() dgv1.datasource = nothing tablebindingsource.datasource = tableadapter.getdata() tableadapter.fill(dataset2.table) bindingsource.resetbindings(false)
but doesnt work. not error dgv2 not refilled until program restarts.
ok here solution:
private sub form_activated(byval sender object, _ byval e system.eventargs) handles mybase.activated form_load(nothing, nothing) end sub
anyone can explain why works , nothing of code above?
Comments
Post a Comment