Update rad element (e.g. grid view) from database

2 posts, 1 answers
  1. Rostislaw
    Rostislaw avatar
    15 posts
    Member since:
    Nov 2015

    Posted 05 Sep 2019 Link to this post

    HI *,

    my UI application will display data fetched from a known database / table.

    The table content will be modified by another process  - assume the rows will be only added to the table during the application run.

    So I decided to implement a kind of polling for this.

    I know the table name and the database schema. What is the best way to do following:

    * on the very begin of the application I will read the content of the table and display this (chart, grid, etc.)

    * periodically I will get a modified table and update my UI (with a newly added rows)

     

    What is the best way to implement this?

    Thank you 

    Rostislaw

     

  2. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4166 posts

    Posted 06 Sep 2019 Link to this post

    Hello, Rostislaw,    

    Most of the data controls in the Telerik UI for WinForms suite support data-binding. Hence, you can create an appropriate DataSource collection, e.g. DataTable, populate it with the extracted data from your external source and apply this DataSource to the respective control, e.g. RadGridView. Then, periodically you can fetch the data from your database and update the DataTable set as DataSource for the RadGridView for example.

    You can refer to the following help articles which will give you more information about binding RadGridView:
    https://docs.telerik.com/devtools/winforms/controls/gridview/populating-with-data/databinding-radgridview
    https://docs.telerik.com/devtools/winforms/controls/gridview/populating-with-data/tutorial-binding-to-datatable-or-dataset
    https://docs.telerik.com/devtools/winforms/controls/gridview/populating-with-data/updating-the-database-with-ado.net

    RadChartView also supports data-binding. Additional information on this topic is available here: https://docs.telerik.com/devtools/winforms/controls/chartview/populating-with-data/binding-to-datatable

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

     

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top