Hi there,
I am struggling with the following for some time now. I use the datagrid control in 3 ways.
1. To view a database query result and search in the result in the datagrid
2. When I need to update the database with a record
3. When I Insert data into a record.
Depending on these three functions I need the datagrid to behave different.
In the case of 1. The first row should be editable and the rows containing data should be read only. Just for selection purpose
In the case of 2. Only the row that needs to be updated (record in the database) should be editable. Just add a complete row from the datagrid view as a ercord in the database.
In case of 3. the row where the insertion needs to be done should be editable and the rest read only. Insert the new data in a existing database record.
What is the best way to do this?
is it better to do this ina custo control or just code it in the forms?
Thanks in advanced,
Cire
I am struggling with the following for some time now. I use the datagrid control in 3 ways.
1. To view a database query result and search in the result in the datagrid
2. When I need to update the database with a record
3. When I Insert data into a record.
Depending on these three functions I need the datagrid to behave different.
In the case of 1. The first row should be editable and the rows containing data should be read only. Just for selection purpose
In the case of 2. Only the row that needs to be updated (record in the database) should be editable. Just add a complete row from the datagrid view as a ercord in the database.
In case of 3. the row where the insertion needs to be done should be editable and the rest read only. Insert the new data in a existing database record.
What is the best way to do this?
is it better to do this ina custo control or just code it in the forms?
Thanks in advanced,
Cire