[CLOSED] How to refresh the contents of a TreeGrid control?

  1. #1

    [CLOSED] How to refresh the contents of a TreeGrid control?

    Hi,

    I'm trying to rebuild a databound TreeGrid control from new data within a Direct method. The direct method is executed, the data get retrieved from the database and the nodes are built and added, however, the TreeGrid doesn't get refreshed. What am I missing here?

    [DirectMethod]
    public void Refresh(){
        TreeGrid1.RemoveAll();
        TreeGrid1.ClearContent();
        
        // Calling a method that retrieves the data and builds the nodes and the leaves of the grid
        BuildAndDatabind();
    }
    Last edited by Daniil; Jun 29, 2015 at 12:45 PM. Reason: [CLOSED]
  2. #2
    From this example, I get a sense it should be accomplished on the client:

    Refresh Static Tree

    If this is the only way around it, please feel free to close this thread.
  3. #3
    The alternative approach could be re-rendering a TreeGrid from server side.
  4. #4
    Thanks, Daniil. The TreeGrid control is defined in the markup. When I tried to rebuild its nodes and leaves, nothing happened. Perhaps, I need to completely destroy the control first in order to start from scratch. It's fine the way it's done in the example, though, so you may close this thread down.
  5. #5
    Yes, re-rendering actually means an entire recreating of the control.

Similar Threads

  1. Replies: 4
    Last Post: Sep 21, 2013, 6:27 AM
  2. Can't refresh TreeGrid
    By daibx in forum 1.x Help
    Replies: 0
    Last Post: May 14, 2013, 11:16 PM
  3. Replies: 5
    Last Post: Sep 03, 2012, 1:38 PM
  4. [CLOSED] Window control not updating contents
    By sadaf in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Oct 24, 2011, 3:57 PM
  5. [CLOSED] TreeGrid: refresh
    By RomualdAwessou in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 20, 2010, 7:57 PM

Tags for this Thread

Posting Permissions