Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Refresh DataGrid question

Refresh DataGrid question

Scheduled Pinned Locked Moved C#
databasequestionannouncement
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    markdbd
    wrote on last edited by
    #1

    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.

    A 1 Reply Last reply
    0
    • M markdbd

      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.

      A Offline
      A Offline
      Alex Korchemniy
      wrote on last edited by
      #2

      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 the DataGrid 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

      M 1 Reply Last reply
      0
      • A 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 the DataGrid 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

        M Offline
        M Offline
        markdbd
        wrote on last edited by
        #3

        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.

        A 1 Reply Last reply
        0
        • M markdbd

          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.

          A Offline
          A Offline
          Alex Korchemniy
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups