Hybrid View

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Location
    Kraków
    Posts
    8
    Vote Rating
    1
    PavlaQ is on a distinguished road

      0  

    Default Answered: Tree Panel checkbox icon problem

    Hi,
    I need help. I have Tree Panel and Grid Panel. In tree panel are categories from database. After onclick event in tree panel is automatically loaded store from ajax request to grid panel. In grid is column with checkboxes. And here is my problem. After check/uncheck record in grid I want set checkbox icon in treepanel (id field from tree store is the same what parent field in grid store) and icons for this node parents. I haven't idea how i can do it.

    Any help? It's very important for me...

  2. 1. On check/uncheck item in grid, get recordId of checked/unchecked record.
    2. Get respective node in tree panel by using
    <treeStore>.getNodeById().
    3. If node found, then call node.set('checked', true/false).

  3. #2
    Sencha User
    Join Date
    Jan 2012
    Posts
    1,376
    Vote Rating
    112
    Answers
    347
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      1  

    Default

    1. On check/uncheck item in grid, get recordId of checked/unchecked record.
    2. Get respective node in tree panel by using
    <treeStore>.getNodeById().
    3. If node found, then call node.set('checked', true/false).

  4. #3
    Sencha User
    Join Date
    Jan 2012
    Location
    Kraków
    Posts
    8
    Vote Rating
    1
    PavlaQ is on a distinguished road

      0  

    Default

    great! it's working.

    My last problem is How can I set a css propeties this node? I want set checkbox background image in tree panel (default is checkbox.gif)

  5. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    1,376
    Vote Rating
    112
    Answers
    347
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      1  

    Default

    Try to use <node>.set('cls', 'nodeClass').

Thread Participants: 1

Tags for this Thread