detecting new data & auto-refreshing

3 posts, 0 answers
  1. chris_cf
    chris_cf avatar
    53 posts
    Member since:
    Jul 2007

    Posted 18 Oct 2011 Link to this post

    I have a RadGrid which when I add a record, launches a thread to create a new record and other things. The new record is created with status "Generating". When the thread finishes executing, it changes the status to "Generated".

    Is it possible to have RadGrid auto-refresh when the record's status changes? Or auto-refresh even when it detects a new record in the database table it is bound to?
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 18 Oct 2011 Link to this post


    You can achieve this thing by using Ajaxify Timer.

    public void Timer1_Tick(object sender, EventArgs e)
       // check here your DB have any new records if yes then rebind your grid.

    in page_load event you can store total no of rows of table in session.
    and in Timer1_Tick event again get total no of records and check it is equal not to session value then rebind your grid.

    Jayesh Goyani
  3. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Oct 2011 Link to this post

    Hello Chris,

    I am not sure about your scenario. When you are doing automatic data source operations RadGrid will automatically rebind after inserting a new record. In the case of manual insert you can call the Rebind method which will rebind the Grid. Hope this helps.

Back to Top