Skip to Content
avatar image
Former Member

setResizable() with using setWidth() in ui.table

Hello everyone,

I have defined the width of the columns in a ui.table, so that the columns can be shown with the expected width in the initial load. Besides, the user should be able to resize those columns manually (by mouse) when they want. But in my case, the columns can't be resizeable after I have used the method setWidth(), the and autoresizable doesn't work either. Does anyone has an idea?

oTable.addEventDelegate({

 "onAfterRendering": function(){   
for(var i=0; i<oTable.getColumns().length; i++){
oTable.getColumns()[i].setWidth("auto");
oTable.getColumns()[i].setResizable(true);
oTable.getColumns()[i].setAutoResizable(true);
}
          }
     }, this);
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 07, 2017 at 01:54 PM

    any solutions or suggestions?

    Add comment
    10|10000 characters needed characters exceeded

    • what if you do not set the width / resisable feature? the width is by default set to auto... and the resizable property is also allowed. would that do what you need. just do not set those properties

  • avatar image
    Former Member
    Nov 07, 2017 at 08:59 PM

    Hi Vincent

    I have set width to the columns and resizing works ok

    http://jsbin.com/ducuyah/edit?html,js,output

    Can you provide code sample?

    Thanks

    -D

    Add comment
    10|10000 characters needed characters exceeded