jQWidgets Forums

jQuery UI Widgets Forums Grid Grid Group | Increase / Add width dynamically to a column

This topic contains 0 replies, has 1 voice, and was last updated by  rskbuvan 11 years, 10 months ago.

Viewing 1 post (of 1 total)
  • Author

  • rskbuvan
    Spectator

    Hi,

    I’ve a requirement here to swap/toggle the grid grouping into two views through button click,

    Source Definition:

    var grid_source =
    {
    datatype: "xml",
    mtype: 'GET',
    datafields: [
    { name: 'AccountName', type: 'String'},
    { name: 'Service', type: 'String'},
    { name: 'View', type: 'bool' },
    { name: 'Edit', type: 'bool'},
    { name: 'Status', type: 'String'},
    { name: 'Ccy', type: 'String'},
    { name: 'Limits', type: 'Number' },
    ],
    root: "Accounts",
    record: "Account",
    id: 'AccountID',
    url: url
    };

    Column width is defined as below, for your understanding (7 columns):

    AccountName = width:"10%"
    Service = width:"40%"
    View = width:"10%"
    Edit = width:"10%"
    Status = width:"10%"
    Ccy = width:"10%"
    Limits

    One View(Default): When the grid is loaded, it is grouped by one column; for example “AccountName” and I’ll hide the same grouped column i.e. “AccountName“.

    Another View: I’ll remove the default grouped column, show the hidden column (Account Name) and add a new group (Service) and hide this new grouped column i.e. “Service“.

    Here I want to add a new width for “AccountName” column since the newly hidden column width i.e. Service had 40%. So the toggling between two views doesn’t adjust the grid width automatically.

    Can anyone suggest me a solution?

    Looking for a solution.

    Thanks & Cheers,
    \_rssb

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.