Hey guy's,
I know this might be a newbie question but after 3 days of searching the Internet and experimentation in my test app I just can't figure it out.
I have a single data grid on my winform which needs to change what data is being displayed in it based on a button which is clicked.
EG: I have three buttons on my winform named accounts, contacts, and cases.
What I need to be able to do is when I click on one of those buttons the data source for the datagrid changes as in when I click on the accounts button the datagrid shows all o the accounts in the accounts table in my database.
I have been able to show a single dataset from my database by defining the data source during design from within the component itself but unfortunately I can't figure out how to change it on the fly.
I know how to clear out the datagrid by using the datasource = nothing method but trying to then select an alternate data source has me really stumped
I have connected my database server to my server explorer window in Visual Studio 2010.
Any assistance with this is greatly appreciated.
I know this might be a newbie question but after 3 days of searching the Internet and experimentation in my test app I just can't figure it out.
I have a single data grid on my winform which needs to change what data is being displayed in it based on a button which is clicked.
EG: I have three buttons on my winform named accounts, contacts, and cases.
What I need to be able to do is when I click on one of those buttons the data source for the datagrid changes as in when I click on the accounts button the datagrid shows all o the accounts in the accounts table in my database.
I have been able to show a single dataset from my database by defining the data source during design from within the component itself but unfortunately I can't figure out how to change it on the fly.
I know how to clear out the datagrid by using the datasource = nothing method but trying to then select an alternate data source has me really stumped
I have connected my database server to my server explorer window in Visual Studio 2010.
Any assistance with this is greatly appreciated.