jQuery UI Widgets › Forums › Grid › Pinned column on-the-fly – corrupted grid
This topic contains 1 reply, has 2 voices, and was last updated by Dimitar 11 years ago.
-
Author
-
Hello everybody,
I have a very strange grid behavior when changing “pinned” column status on the fly. More details:
1. The column properties are changed on the fly on grid data load complete:
var dataAdapter = new $.jqx.dataAdapter(source, { loadComplete: function (fulldata) { adjOptCols(); } }); function adjOptCols(){ var isOpt = $("#isOpt").val(); $('#search-res').jqxGrid('setcolumnproperty', 'check', 'hidden', isOpt); $('#search-res').jqxGrid('setcolumnproperty', 'checkSel', 'hidden', isOpt); $('#search-res').jqxGrid('setcolumnproperty', 'hs', 'hidden', isOpt); $('#search-res').jqxGrid('setcolumnproperty', 'min', 'hidden', !isOpt); $('#search-res').jqxGrid('setcolumnproperty', 'max', 'hidden', !isOpt); //$('#search-res').jqxGrid('setcolumnproperty', 'funds', 'pinned', isOpt); }
Everything works fine unless I add the last line (commented) which should pin the column “funds”. When this line is added I need to load grid data two times to show everything properly (hidden and pinned columns). This is what happens on the 1st grid load:
Scenario A – isOpt == true (before it was false). All columns that are supposed to be hidden/shown are OK, but the column “funds” is not pinned. The 2nd click fixes the problem, i.e. the column “funds” is pinned and all other columns are shown correctly.
Scenario B – isOpt == false (before it was true, i.e. column “funds” was already pinned). The columns “check”, “checkSel” and “hs” are in wrong order: shown after the column “funds”. The 2nd click again fixes the problem and all columns are shown in right order yet “funds” is not pinned.
Note that this mess happens only when adding the last command line in the function adjOptCols to pin column “funds”.
How can I get it fixed?
Thanks!
Hello andy8,
Please share a complete example, which we may test locally to determine the source of the issue. Make sure you are using the latest version of jQWidgets (3.2.1).
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.