Current in columnchooser popup, selected columns come on the left side and available on right side, is there a way i can swap the columns to make available on left and selected on right ?
Asked
Active
Viewed 328 times
0
-
You can use jQuery.append to move elements on the page (in the dialog too), but is it really required to move all from right to left and from left to the right? Which advantages have the users from the changes? Both list boxes have the description above the list with the columns. Thus the users can find the columns in any case. – Oleg Feb 29 '16 at 17:41
-
Thanks Oleg! Do you have a sample code ? Yes i need that as customer is used to that look, and i can not deliver it with the current behavior. – Vips Mar 01 '16 at 19:50
-
It seems to me that the customer order me instead of you the changes... Nevertheless I wrote for you the demo which demonstrates the implementation. – Oleg Mar 01 '16 at 20:26
1 Answers
0
I prepared the demo for you, which demonstrates what you can do. It displays columnChooser
dialog like
The demo uses the following code inside of onClickButton
callback:
$(this).jqGrid("columnChooser");
var $available = $("#colchooser_list .ui-multiselect > .available");
$available.prependTo($available.parent())
.css({
"border-left": "0 none",
"border-right": "1px solid"
});

Oleg
- 220,925
- 34
- 403
- 798
-
One more Question, when i click on Remove all button it makes add all and plus icons inactive, the buttons work, but the only change that is reflected is Remove All (once it is clicked) I am doubting it a jqgrid version, n i am using jqGrid-4.4.4 and jquery-ui-1.10.2. Any suggestion ? For now i am hiding the buttons – Vips Mar 03 '16 at 16:19
-
@Vips: Do you have the problem in [my demo](http://ok-soft-gmbh.com/jqGrid/OK/columnChooserChangedOrder.htm) which uses free jqGrid 4.13.0? If I remind me correctly, it's a bug in retro version 4.4.4. It's fixed already. You should upgrade to the latest version of [free jqGrid](https://github.com/free-jqgrid/jqGrid) (4.13.0). If you used NuGet package, then you should uninstall it and install [free-jqgrid](https://www.nuget.org/packages/free-jqGrid/4.13.0) package instead. – Oleg Mar 03 '16 at 17:36
-
No Oleg, That is good, changing jqgrid version is doable but needs compatibility testing for the entire application, But will try with the newer version and see if that fixes it. Thanks Again for your help! – Vips Mar 03 '16 at 19:28
-
@Vips: You are welcome! You can report me compatibility issues which you could find. – Oleg Mar 03 '16 at 19:46