0

I am creating a custom column chooser for jqgrid. On selecting columns and saving, I get a set of columns as selected columns.

How to update the grid with selected columns, manually? Thanks.

Rustin Cohle
  • 161
  • 1
  • 1
  • 12
  • Please [edit] to add meaningful code and a problem description here. Posting a [Minimal, Complete, Verifiable Example](http://$SITEURL$/help/mcve) that demonstrates your problem would help you get better answers. Thanks! – emartinelli Mar 17 '16 at 11:54

1 Answers1

1

It's very easy:

  • you need to use showHideCol method (or showCol and hideCol) for showing/hiding the columns
  • you should use remapColumnsByName method (or an old remapColumns) for changing the order of the columns. See the demo from the answer and the demo from another answer.
Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • I believe both ShowHideCol and rempaColumnsByName will refresh the grid automatically. Correct? – Rustin Cohle Mar 17 '16 at 12:12
  • @RustinCohle: The methods are from jqGrid and the results of changes will be visible immediately after applying. – Oleg Mar 17 '16 at 12:16