Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
665
Swap rows and Columns
posted

Hello,

Is it possible to swap the rows with columns in a webgrid using Vol1 2008 CLR 3.5?

THanks

 

  • 345
    posted

    fastforward1,

    If you install jQuery, you can do something like this to swap two rows:

    var grid = igtbl_getGridById(gridId);
    var row4 = grid.Rows.getRow(4); // this is one way of getting your row
    var row2 = grid.Rows.getRow(1);

    $(row4.Element).insertBefore($(row2.Element));

    or

    $(row4.Element).insertAfter($(row2.Element));

    Hope this is an OK interim solution for you.

    Nick

  • 45049
    Verified Answer
    posted

    WebGrid does not currently have the ability to swap rows and columns.  If you'd like to see this functionality in a future release of the toolset, you can submit a feature request here - feature requests are one of many tools we use to determine what functionality to include in a new release.