0

I am trying to sort a column which is frozen. Not getting where to start. I found a similar question here but that is not on frozen columns. Also another Oleg's example here but there is no sorting on frozen columns

Could anyone please help me on this.

Community
  • 1
  • 1
SK.
  • 1,390
  • 2
  • 28
  • 59
  • **Which version of jqGrid you tried and from which fork of jqGrid** ([free jqGrid](https://github.com/free-jqgrid/jqGrid), commercial [Guriddo jqGrid JS](http://guriddo.net/?page_id=103334) or an old jqGrid in version <=4.7)? You included 3 **exceptional** tags to your question. Please go to the links which describe the tags: [jqgrid-asp.net](http://stackoverflow.com/tags/jqgrid-asp.net/info), [jqgrid-php](http://stackoverflow.com/tags/jqgrid-php/info), [free-jqgrid](http://stackoverflow.com/tags/free-jqgrid/info). – Oleg Aug 26 '16 at 20:39
  • @Oleg, Updated tabs. I am using Free jqGrid 4.3.1 - jQuery Grid – SK. Aug 26 '16 at 20:42
  • I develop [free jqGrid](https://github.com/free-jqgrid/jqGrid) fork after renaming the make fork to Guriddo jqGrid JS, changing the licence agreement and making it commercial (see [the post](http://www.trirand.com/blog/?p=1438)). I implemented many new features and fixed many bugs (inclusive frozen columns features). You can try the current version of free jqGrid 4.13.4 directly from CDN. See [the wiki article](https://github.com/free-jqgrid/jqGrid/wiki/Access-free-jqGrid-from-different-CDNs) for details. – Oleg Aug 26 '16 at 20:43
  • The name "free jqGrid" is the name of one product (the fork of jqGrid, which I develop and publish under the name: see [npm](https://www.npmjs.com/package/free-jqgrid), [NuGet](https://www.nuget.org/packages/free-jqGrid/), [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cfree-jqgrid) and other). The first version of the product is 4.8, the current version is 4.13.4. jqGrid 4.3.1 is **retro version** published 5 years ago. It contain old and buggy implementation of `setFrozenColumns`. I strictly recommend you to try 4.13.4. – Oleg Aug 26 '16 at 20:46
  • @Oleg, Thanks for your quick help and reply. It looks like I can't change the complete js now. Do you think you can provide a quick hint how to fix this. Thanks! – SK. Aug 26 '16 at 20:50
  • You don't need to do anything, just use `ui.jqgrid.css` and `jquery.jqgrid.min.js` (`grid.locale-en.js` is not more required) and all should just work. Try it. You need to change 3 lines of your HTML code which load the files. See [here](http://free-jqgrid.github.io/getting-started/index.html), [the wiki](https://github.com/free-jqgrid/jqGrid/wiki) and READMEs to every published version for additional information about new features. I'd recommend you for example to use [Font Awesome](http://fontawesome.io/) – Oleg Aug 26 '16 at 20:53
  • @Oleg, Ok, I saw my javascript. It looks like I am using http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.3.1/js/jquery.jqGrid.src.js. I hope it is free. if not please let me know. – SK. Aug 26 '16 at 21:01
  • jqGrid 4.3.1 is free, but it's too old to be used today. It's like the usage of an auto build in 1930. It could still be in order, but supporting of the auto could be very expansive. Do you tried free jqGrid 4.13.4? Do you have any compatibility problems? – Oleg Aug 26 '16 at 21:15
  • @Oleg, I tried. I am getting error "Grid can not be used in this ('quirks') mode". I am sure it is because I am using IE and Compatibility mode is 5. And we can't change the version now. – SK. Aug 26 '16 at 21:18
  • Do you have ` ` at the beginning of the document and `` inside of the ``? Which version of IE you use? Why you want to simulate IE5? Do you have the demo online? – Oleg Aug 26 '16 at 21:24
  • I thought of adding that. But that also not allowed. Becuase if I change that it will change the UI look n feel of entire site. – SK. Aug 26 '16 at 21:28
  • I can't follow you. **Which lowest version of IE you want to support?** Supporting of IE5 is impossible today. Which othe jQuery libraries you use? The most even old version don't support quirks mode. You can include `` for example, but no `` means practically no support of IE now. – Oleg Aug 26 '16 at 21:34
  • @Oleg, Thanks a lot. I know in one of your suggestion in some other qustion you suggested to loop like this: $.each($grid[0].grid.headers, function () {....}. Can we write something like this. – SK. Aug 26 '16 at 21:40
  • You are welcome! **Which lowest version of IE you want to support?** What you try to implement? Why you need `$.each($grid[0].grid.headers, ...`? – Oleg Aug 26 '16 at 21:42
  • @Oleg, IE5. I already have a JQGrid and there are 2 frozen columns. Currently sorting is not working on frozen columns when any one row is in edit mode. I see some has implemented your code to sort even if any row is in edit mode. (I came to know by googling and found http://stackoverflow.com/questions/9280418/issue-with-sorting-column-while-editing-rows-inline-in-jqgrid) – SK. Aug 26 '16 at 21:45
  • Which version of jQuery and jQuery UI you use? Sorry, but supporting of IE5 now is really unrealistic. Windows XP support IE8 only. Even on Desktop computers only and in such land as India one use 6.47% of IE totally (see [here](http://gs.statcounter.com/#desktop-browser-IN-monthly-201504-201604-bar)) . I know nobody today who supports systems lower as IE8. IE8 be used on 2.38% of computers of worldwide (see [here](http://gs.statcounter.com/#desktop-browser_version_partially_combined-ww-monthly-201504-201604-bar)) and 1.8% in India. More old IE is not in statistic more. – Oleg Aug 26 '16 at 22:04
  • By the way, jqGrid 4.3.1 works also incorrect in IE5, but the error message is just included later in the code of jqGrid. It works in Chrome (the most used web browser today) incorrect too. See [the bug](http://stackoverflow.com/a/10621951/315935), which is fixed in version 4.3.3. – Oleg Aug 26 '16 at 22:05
  • unfortunately it is an existing project in usa. I see there are some changes done in the jqGrid 4.3.1.js to support IE5. Actually we are using latest version of IE. but not sure why they have made the compatibility mode as IE5. But thanks for your patience to reply. – SK. Aug 26 '16 at 22:09
  • Short say: `` is **mandatory** if you need support IE in some version. If your existing web site require simulation of some old IE then `` could be a good choice. I personally recommend everybody to use `` and to modify the code of the site to work correctly in IE11 Edge mode. It's the only way to stay up-to-date. It's my personal opinion. – Oleg Aug 26 '16 at 22:15

0 Answers0