I'd like to programmatically add and remove columns from ubergrid. Looking at the documentation it seems as if you can only do this for child columns, but I want to do this for the main column.
If possible, would there be an easy way to remove all of the columns and just add new ones?
I see that there is a plugin for headermenu, but what I'm trying to do is basically load different stores in the same grid.
Re: Add and remove main columns from grid.
Posted: Tue Jul 09, 2013 9:08 pm
by mats
Yes you can. You can see this demonstrated by our test suite. Open /tests/ and run this test:
014_add_remove.t.js
It shows you all you need to know
Re: Add and remove main columns from grid.
Posted: Tue Jul 09, 2013 11:12 pm
by osolano
mats,
It looks like insertColumn and appendColumn only add children to existing columns in ubergrid. I want to add new main/primary columns.
I wrote something like this:
grid.columns.appendColumn({
header : 'TEST',
//dataIndex : 'CURRENCY',
width :300
});
grid.refresh();