Hi all,
I've got some specific questions about the datagrid. I'm using Microsoft Visual Studio .NET 2003 to develop an application. I'm new to VB.Net and I've got a hard time with the differences between developing with VB.Net and developing with MS Access VBA (the latter I've been using till now on).
I want to offer the users of my application an overview of many records. I figured that the datagrid would be the right tool to do this. However I need to know some things about it before I can actually use it.
The data that I need to view comes from two data sources, 1 Mysql database and 1 other database (this is really nescessary in this case). First I read the records from the Mysql db and after that I add some additional information (in new columns) from the other db. I put the data from the Mysql db and the additional information from the other db together in one dataset (maybe I'm going to use a dataview later on to be able to sort and filter easily) and after that I link the dataset with a datagrid. Now I want the user to be able to edit the data.
Is the datagrid the right tool to use to create the functionality that I need here?
It would be very interesting if I could bind the Mysql data directly to the datagrid so that instant updates are possible. I know how to do this (using a data-adapter) but can I also do this when I add addtional columns (with information from the other db) to the dataset and after that bind it with the datagrid. Would the Mysql data still be updatable directly in this scenario? And more important: how do I get this to work?
I'd also like to know if there is a possibility to trigger a procedure when a field in the datagrid is updated by the user. I would be able to update the data from the other database using this 'after update procedure' if I knew how to do this. So how can I do this?
Another problem that I ran across is that I want the user to be able to edit some of the columns of the datagrid but not all the columns. Is there a way to restrict the editing of the data in the datagrid to only a part of the columns in the datagrid?
The last question (sorry for this long post):
In some situations I need to give the user tha ability to use comboboxes to edit some of the data fields in the list of records that I display. Example, I've got a field status that can only contain certain values ('U', 'F'). Now I want a combobox in each record with 'U' and 'F' in the dropdown list. This can be done easily in MS Access but can this be done in VB.Net too? And can it be done within a datagrid? It would be great if I could display a combobox instead of a text field in each record for a certain column.
Is there someone that wants to answer these questions and get me going with VB.Net? It would really be very much appreciated because I can sure use some advices from more experienced VB.Net developers!
I've got some specific questions about the datagrid. I'm using Microsoft Visual Studio .NET 2003 to develop an application. I'm new to VB.Net and I've got a hard time with the differences between developing with VB.Net and developing with MS Access VBA (the latter I've been using till now on).
I want to offer the users of my application an overview of many records. I figured that the datagrid would be the right tool to do this. However I need to know some things about it before I can actually use it.
The data that I need to view comes from two data sources, 1 Mysql database and 1 other database (this is really nescessary in this case). First I read the records from the Mysql db and after that I add some additional information (in new columns) from the other db. I put the data from the Mysql db and the additional information from the other db together in one dataset (maybe I'm going to use a dataview later on to be able to sort and filter easily) and after that I link the dataset with a datagrid. Now I want the user to be able to edit the data.
Is the datagrid the right tool to use to create the functionality that I need here?
It would be very interesting if I could bind the Mysql data directly to the datagrid so that instant updates are possible. I know how to do this (using a data-adapter) but can I also do this when I add addtional columns (with information from the other db) to the dataset and after that bind it with the datagrid. Would the Mysql data still be updatable directly in this scenario? And more important: how do I get this to work?
I'd also like to know if there is a possibility to trigger a procedure when a field in the datagrid is updated by the user. I would be able to update the data from the other database using this 'after update procedure' if I knew how to do this. So how can I do this?
Another problem that I ran across is that I want the user to be able to edit some of the columns of the datagrid but not all the columns. Is there a way to restrict the editing of the data in the datagrid to only a part of the columns in the datagrid?
The last question (sorry for this long post):
In some situations I need to give the user tha ability to use comboboxes to edit some of the data fields in the list of records that I display. Example, I've got a field status that can only contain certain values ('U', 'F'). Now I want a combobox in each record with 'U' and 'F' in the dropdown list. This can be done easily in MS Access but can this be done in VB.Net too? And can it be done within a datagrid? It would be great if I could display a combobox instead of a text field in each record for a certain column.
Is there someone that wants to answer these questions and get me going with VB.Net? It would really be very much appreciated because I can sure use some advices from more experienced VB.Net developers!