Dynamic Columns

Discuss anything related to Ext JS development.

Dynamic Columns

Postby cicaglisa » Mon Sep 12, 2011 3:29 pm

Hi,
I was wondering how can I make a Gantt chart with dynamic columns, in all examples on your website there is a static loading of columns. In our case we need a XML with all columns to be shown and another XML will be sending back data with all the necessary data to be shown.
For example we can have 4 or N columns like this:

{
header: 'Tasks',
sortable: true,
dataIndex: 'Name',
locked: true,
width: 200
},
{
header: 'Start',
sortable: true,
dataIndex: 'StartDate',
locked: true,
width: 80
},
{
header: 'End',
sortable: true,
dataIndex: 'EndDate',
locked: true,
width: 80
}
{
header: 'Some info',
sortable: true,
dataIndex: 'EndDate',
locked: true,
width: 80
}

and we will load all the necessary data in a store.
The issue I'm having here is how can I have dynamic fields in a store and dynamic columns generated based on XML file and is that possible at all?
cicaglisa
 
Posts: 50
Joined: Mon Sep 12, 2011 3:16 pm

Re: Dynamic Columns

Postby nickolay » Mon Sep 12, 2011 3:33 pm

Sure, thats possible with some additional effort. You will need to manually generate the "columns" config for gantt, based on your data. Same for fields in store - create a new model, subclassing the Sch.model.Event.
We offer training in both Ext JS and our products, read more here.
Read the API documentation
User avatar
nickolay
Core Developer
Core Developer
 
Posts: 1070
Joined: Mon May 16, 2011 10:48 am


Return to Open discussion

Who is online

Users browsing this forum: No registered users and 1 guest