Hi,
I want to add the column dynamically such that
: The newly inserted column should adjust its width according to the pre-defined(100%) div width.
: Also I have customize the style of the grid using setColumnColor().
Please help.
This is the function I have written :
libTableGrid.insertColumn(libTableGrid.getColumnsNum()+1,window.prompt(‘Column Header Name’),‘ed’,‘15’,‘str’,‘left’,‘center’,false,‘white’);
__________________________________________________________________________________
I want to delete the SELECTED column (When I click in Header) dynamically. How to do it ?
__________________________________________________________________________________
I want to sort the SELECTED row. How to do it ?
>>: The newly inserted column should adjust its width according to the pre-defined(100%) div width.
Width of added column must be defined in pixels, so you can use
libTableGrid.insertColumn(libTableGrid.getColumnsNum()+1,window.prompt(‘Column Header Name’),‘ed’,mygrid.entBox.offsetWidth*0.15,‘str’,‘left’,‘center’,false,‘white’);
>>I want to sort the SELECTED row. How to do it ?
Sorting columns not supported. Component can sort only rows.
>>I want to delete the SELECTED column
There is no such functionality as column selection, but you can get index of currently selected column in data part of grid as
grid.getSelectedCellIndex()
and use related value in any command.
Technically, click in grid’s header can be catched by using
onHeaderClick
event.