Results 1 to 2 of 2

Thread: How to map index property to different attribute for tree panel

  1. #1

    Default How to map index property to different attribute for tree panel

    Hi,
    I have implemented Gnt.panel.Gantt which is built on Ext.tree.Panel As per my understanding, the index field of Gantt is inherited from NodeInterface. But I already have an attribute in the REST API (called DisplaySequence) which is used to display the tasks in a particular sequence.
    How do I map the index attribute to the existing DisplaySequence attribute so that they remain in sync?
    I have tried the following in Task model:
    Code:
    {
                name: 'index',
                type: 'number',
                mapping: 'DisplaySequence',
                persist: true
    }
    After making this change I have observed that on page load, index is still populated automatically as 1,2,3,etc. But on making any structural change, the index is changed correctly and synced to the DisplaySequence attribute as I can see the parameters in the POST:
    Code:
    {
                DisplaySequence: 5,
                TaskId: 300100169779590
    }
    Now my only requirement is that on page load, index should be populated with the values of DisplaySequence. How do i achieve this?

  2. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017
    Posts
    1,006
    Answers
    5

    Default

    Hi there- Unfortunately I do not have the answer for you but I have asked that a member of the support team reach out to you and provide some assistance. Thank you so much for your patience.

    Michele

Similar Threads

  1. How to map index property to different attribute for tree panel
    By sonakshibajaj in forum Ext JS 6.x Q&A
    Replies: 2
    Last Post: 9 Jan 2019, 6:01 AM
  2. How to get numeric index for tree panel in ExtJs
    By Amrutha03 in forum Ext: Q&A
    Replies: 1
    Last Post: 30 Jul 2012, 3:28 PM
  3. Tree panel Drag and Drop limit to class/attribute
    By Florynth in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 14 Oct 2007, 9:35 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •