Dynamic Columns
2 posts
• Page 1 of 1
Dynamic Columns
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?
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
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.
-

nickolay - Core Developer

- Posts: 1070
- Joined: Mon May 16, 2011 10:48 am
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest