We use jqgrid to display data in a tabular view. When a column has upper and lower letters, the client side sorting shows the lower and upper letters in random order. Some lower case letters are showing first than the upper case letters, others show the upper case letters first. Please see the FirstName Column in the picture. Does anyone have experienced this same behavior and is there an explanation for this? Or what we have done wrong? We use JQGrid version 4.4.3.
You can use ignoreCase: true option to make local sorting case insensitive.
More recent version of jqGrid allows full customize sorting and searching/filtering (see the wiki article as the start point). New versions allow you to specify custom compare function for comparing items in the column. It allows to implement any custom sorting behavior. You use 5 years old jqGrid version 4.4.3, which is dead since a long time. I recommend you to upgrade to free jqGrid 4.15.2.
Just to give a conclusion on this post. I changed ignoreCase's value form true to false. When this flag is false, the grid sorts the values based on their Unicode. The sorted result is consistent each time when user clicks to sort. However, the sorting of the foreign characters (such as characters with accents) do not match the popular sorting behavior. Achieving a consistent sorting result is good enough for the coming release if our product. We will look into upgrading the jqGrid to newer version in the future. Thanks #Oleg for your help.
Related
On a number of reports I have noticed that setting sort options through the tablix properties does not work. I choose the data I'd like to sort by (date) and set the option (Z to A), but the report still shows unsorted. Has anyone else seen this issue? I have read that updating the report xml to include the sort may be what needs to be done because the report builder does not preserve the changes made. Haven't gone down that road yet as I'm looking to see if there's a fix already identified.
Date Type Lead Name State distance Consultant ZIP State 1 Level Reason url
Those are the columns from the export with data filling each column. Can't give too much info because it shows phone numbers and addresses.
One option is to sort the data in your dataset. Then you can leave it and SSRS will honor that.
As the others mentioned, make sure you check the datatype so it's not trying to sort the dates as a string.
Set the sort priorities at the group level, not on the table or dataset properties.
You should never have to edit the XML to get this to work. This is a basic built-in feature that most reports use.
Do you have groups on your tablix? if yes, did you try sorting it with the Row Groups or Column Groups at bottom instead of the sorting properties of the tablix?
I have the following issue: I have a large grid, that is primarily sorted by date since the load. This particular table also has the ability to group, as shown in the following image:
(Sorry for posting an image like this, but thanks to the spam filter, i cant directly insert one here)
Issue is that when i group by date (do note that this behavior is not observed in other columns other than date) this happens:
But if i order the date in to the other way, such behavior is no longer observed
I should note also that this implementation is under ASP.MVC 3. I tried to format the date differently, but without avail.
Thanks for your time
If the problem is only the order of sorting (see comments to the question) I think one could solve the problem by the usage sorttype as function. See the old answer and this one for details.
I have pulldown select box for filtering the jqgrid (not using the builtin navbar, and data is local). I'd like to grey out the ones that have no matches in the grid.
Is there a way to perform the query to just get the count without updating the ui rows so I can initialize/update the pulldown to enable only those with matches (or even better to supply the number of matches in the menu)
EDIT:
To clarify I want to disable/greyout my filter menu items not the table row items
Internally jqGrid uses $.jgrid.from method to apply the filter to the data. What you want to implement it's probably not just getting the counts because you wrote:
I'd like to grey out the ones that have no matches in the grid.
Nevertheless all want you want is possible to implement. You will have to write some JavaScript code which uses $.jgrid.from($("#list")[0].p.data) for initialization. Then you have to construct the query using methods like contains, lessOrEquals, andNot, orNot and so on. Then you should apply the query with respect of var queryResults = query.select();. If you examine ids in the queryResults you can make gray all items which are not in the set.
I recommend you to read and to debug the addLocalData method of jqGrid and which contain all what you need. Moreover I recommend you to set breakpoint on the line and examine match and results variables. It this is not simple of cause, but if you need some individual solution you have to invest time in it.
UPDATED: I though more about the described problem. My recent answer with the demo demonstrate how you can solve your problem.
I have several Qlikview charts that have interactive sorting enabled but the odd part is some columns can be sorted ascending or descending and others can only be sorted one way. Nothing happens if you click on the column again.
Each field has a proper sort defined, it looks like a bug - anyone else experience this?
Thanks
Dan
It happens often when on the sort tab of the properties it has selected more than one way of sorting for example you have a field that has sort as text and numeric value
I am working on jqGrid.I had a problem in the navigator rowList.
my data to this field is like this rowList:['25','50','75','-1'].
I am using -1 to display all the records.In the row list,i wish to use "All" instead of "-1" to display all the records is their any possibility to do this.
Thanks in advance.
Regards,
Phani Kumar
There are no All value as rowNum and in the rowList array. You should also not use -1 (see documentation about rowNum for example) or other negative values. The value -1 was allowed in some cases in the old releases of jqGrid, but it is no more supported in last releases. The value like 1000, 10000 are good enough depend on your requirements.
Having some realistic restrictions in the number of displayed rows is a good idea independent on the jqGrid support. No real user are able to examine 1000 rows of information without data paging, filtering (searching) or at least scrolling of the data in the web browser. So the displaying of about 50 or 100 row as maximum is what I would recommend you. Look at another old answer for more details and see included examples.