[CLOSED] Dynamically change the column of Table layout

  1. #1

    [CLOSED] Dynamically change the column of Table layout

    I need to change the column numbers of a table layout after resize. This would help me adjust the number of columns accordingly based on the width of screen.
    Last edited by fabricio.murta; Oct 22, 2019 at 1:28 AM.
  2. #2
    Hello @ojuniour!

    You just need to call the container's updateLayout() method after changing the amount of columns you want in the layout object.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    PERFECT! much appreciated.
    for future reference if you are using table layout..
    by calling the resize listener, based on 'Width' size, you can add or remove column numbers..
    Example below for width less than 1250:
            var ResizerListener = function (table, width, height) {
                if (width < 1250) {
                    table.getLayout().columns = 1;
                else {
                    table.getLayout().columns = 2;
  4. #4
    Glad it helped @ojuniour!

    Thanks for the feedback! And notice you can also use the responsive concept (it applies to the whole window, its viewport to change this without the need to call updateLayout(). There's an example highlighting the feature at:
    - Miscellaneous > Responsive > Basic
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. change the layout of a panel dynamically
    By Girija in forum 2.x Help
    Replies: 1
    Last Post: Mar 29, 2015, 3:44 PM
  2. [CLOSED] Column layout to build a table dynamically
    By trePjt in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 10, 2013, 7:15 AM
  3. [CLOSED] MVC 4 Razor Table Layout.Table
    By ashleysbuss in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 18, 2013, 11:39 PM
  4. I want to change Grid Date column dynamically?
    By mohankumar in forum 1.x Help
    Replies: 0
    Last Post: Feb 15, 2012, 7:42 AM
  5. [CLOSED] Table Layout, 100% width Table
    By sisa in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 20, 2011, 7:40 AM

Posting Permissions