locked
auto refresh data to datagrid RRS feed

  • Question

  • in my C# window form application, i has a datagrid.
    i want to 1 minute (2,3minute...) data auto refresh in this grid.
    i can use timer_Tick event to rebinding my grid. But i want to reload only new data and updated data to my grid.

    anyone know this problem, please tell me
    Thank you very much!
    canh cam
    • Changed type Harry Zhu Thursday, December 11, 2008 9:13 AM
    • Changed type Harry Zhu Tuesday, January 13, 2009 3:43 AM
    Thursday, December 4, 2008 9:53 AM

Answers

  • Try using DataGrid.DefaultView.RowFilter and then bind with DefaultView.

    Let me if that helps.

    Thanks,
    Viral.
    • Marked as answer by Harry Zhu Tuesday, January 13, 2009 3:45 AM
    Thursday, December 4, 2008 3:37 PM
  • it is better to use broker service for the application. You need to refresh the datagrid through timer or through any other means. Just enable the BROKER Service for you database:

    ALTER DATABASE <DBNAME> SET ENABLE_BROKER


    and write the code to handle the message queu.


    thanks,

    PRS

     


    prs
    • Marked as answer by Harry Zhu Tuesday, January 13, 2009 3:45 AM
    Monday, December 8, 2008 2:02 PM

All replies

  • Try using DataGrid.DefaultView.RowFilter and then bind with DefaultView.

    Let me if that helps.

    Thanks,
    Viral.
    • Marked as answer by Harry Zhu Tuesday, January 13, 2009 3:45 AM
    Thursday, December 4, 2008 3:37 PM
  • Thanks for your reply.

    If each 1 second , auto refresh data. And if has a lot of user use this form at a time (100, 1000,... user)
    It is not good for SQL Data Server.

    Anyone has good ideal about design pattern for "auto refresh data", please tell me.

    Thanks!

    canh cam
    Friday, December 5, 2008 1:45 AM
  •  

    Hi,
    For the
    issues about databinding ,please post on :http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=7&SiteID=1
    Thanks,
    Harry

    Monday, December 8, 2008 11:01 AM
  • it is better to use broker service for the application. You need to refresh the datagrid through timer or through any other means. Just enable the BROKER Service for you database:

    ALTER DATABASE <DBNAME> SET ENABLE_BROKER


    and write the code to handle the message queu.


    thanks,

    PRS

     


    prs
    • Marked as answer by Harry Zhu Tuesday, January 13, 2009 3:45 AM
    Monday, December 8, 2008 2:02 PM
  • Thanks for all reply. I will try it.
    canh cam
    Monday, December 22, 2008 9:07 AM
  • Hi Harry

    Please check your link
    http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=7&SiteID=1
    it has been moved or deleted.

    Thanks!


    canh cam
    Monday, December 22, 2008 9:13 AM
  • Hi,

    Please try the link below: 
    http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/threads/

    Best regards,
    Harry
    Tuesday, January 13, 2009 3:42 AM