TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sumit
NA
1
0
Hoe do you maintain the Datatable across the forms?
Nov 7 2009 11:39 PM
Hello Gurus,
I am relatively new to VB.NET windows forms. I have a question for you guys.
I have two Windows forms. First form (Form1.vb) have a grid and a Button (called Search). The grid is initially empty. When the user click the Search button, another form will open (Form2.vb), which also have a grid which is pre-populated and a button (called Select). The user will select some rows from grid from Form2.vb and click select button, then it should bring back the rows to form1.vb grid. User may again click the search button and go to form2.vb and select some more rows and those rows should get APPENDED to the existing rows on form1.vb grid.
I have done this and its also working but I am not sure if that a good solution. What I have done is I have declared a DataTable called gdt in global.vb in my application. Then when the user selects the rows from form2.vb and click select, I populate the gdt datatable with the selected rows. and on form1.vb, I just do datagridview1.datasource = gdt.
I am not sure if declaring a datatable at a global level is a good idea. Any thoughts/help/suggestion will be helpful.
Thanks
Sumit
Reply
Answers (
0
)
BindingNavigator - faint border lines
how can i run this code in a thread