Skip to Content
0

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

Nov 06, 2017 at 02:59 PM

31

avatar image
Former Member

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);
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

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

any solutions or suggestions?

Show 1 Share
10 |10000 characters needed characters left 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

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

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

Share
10 |10000 characters needed characters left characters exceeded