Refresh DataGrid question
-
Hi all, I am making a little application where I am using a datagrid. A menu displays when the user right click on the datagrid. This menu has insert, update, delete options. And when the user clicks on one option it opens a new form so the user can edit or insert data. After filling this form and submiting the data, the form closes and the datagrid should refresh. MY question is: Is it better to make a new query to the database to see the new Information in the datagrid or to insert manually the submitted data into the old Dataset? Another question? Is there any good component that offers Image in Datagrid? Thanks.
-
Hi all, I am making a little application where I am using a datagrid. A menu displays when the user right click on the datagrid. This menu has insert, update, delete options. And when the user clicks on one option it opens a new form so the user can edit or insert data. After filling this form and submiting the data, the form closes and the datagrid should refresh. MY question is: Is it better to make a new query to the database to see the new Information in the datagrid or to insert manually the submitted data into the old Dataset? Another question? Is there any good component that offers Image in Datagrid? Thanks.
Refreshing from the database is an extra round trip that is going to make your app run slower. If the only way of adding data to the database is through the form and you dont have any code updates the database based on what is attached to the
DataGrid
then its the way to go. Just make sure that you don't end up adding the same data twice. Personally I don't use theDataGrid
control that comes with .net. There are more powerful grids like Syncfusion's[^] grid. This posting is provided "AS IS" with no warranties, and confers no rights. Alex Korchemniy -
Refreshing from the database is an extra round trip that is going to make your app run slower. If the only way of adding data to the database is through the form and you dont have any code updates the database based on what is attached to the
DataGrid
then its the way to go. Just make sure that you don't end up adding the same data twice. Personally I don't use theDataGrid
control that comes with .net. There are more powerful grids like Syncfusion's[^] grid. This posting is provided "AS IS" with no warranties, and confers no rights. Alex Korchemniy -
Thanks a lot for the Sungfusion grid tipo :) I think the best way is to add, update, delete the dataset and finally update the database with the updated dataset.
You can do it that way also. Depends on the way you do your business logic. :) This posting is provided "AS IS" with no warranties, and confers no rights. Alex Korchemniy