Sort by clicking on column not displaying - kendo-ui

I'm trying to turn on the sort feature on one of my grids. I've cloned the examples in the Kendo doc, but it never becomes available.
Does it have to be set before or after filters and/or columns? I found when modifying the filters, it had to be done before setting the columns, otherwise it would go with the default.
Thanks

As per usual, I post a question, and thirty seconds later I found the answer.
The developer who wrote the original code broke everything into functions, and then built the kendo portion from them. He never added the sortable option to the final build!

Related

Oracle Apex Interactive Report vs Interactive Grid

I've used them both, but I can't seem to find any advantage to Report vs Grid.
Grid gives the developer much more options and flexibility, and I didn't find any place that really compares pros and cons for each.
Any Reason to use Report over Grid?
Thanks
I developed a set of applications in APEX from 5.1 to 19c and I'd like both, IG and Reports, however I use them in different scenarios:
Obviously if you want a IG for manipulation of data, then IG is your only option.
If you want a Report, but you want to give the user endless options with it like download the content in csv, apply filters, create rules with the data visualisation like applying colours to rows that match different criteria. Then IG is your option
If the report is static and you don't want any interaction on it, then use Report, it is much better for this scenario.
Hope it helps!
I use
reports for reporting purposes - let users view data
interactive grids to view data in a grid, along with possibility to edit existing values or add new rows right here
Although you can make both do what the "other" does (with more or less effort), their "natural" roles are as I previously said. To me, at least.
OK I found one big advantage to working with Interactive Report, when working with Files/Images.
Grid does not contain "Download BLOB" nor "Display Image" options in types, which makes it really hard to work with, and creating many compatibility problems.
I've wasted 2 days trying to work with files in Grid but still failed, while in Report I managed to do that in a couple of hours and it works.
For all other types, I guess Grid is better.

Handsontable sort Dropdown items by date

Is there an option to sort your dropdown items (col-type date) by date?
As seen in the image below the date-values are not really sorted by date since 12/1/2014 is not at first position. Hope this additional information helps to understand my question.
example of dropdown date items
I googled it and found an answer from Handsontable team.
Unfortunately, the answer is you can't without making a workaround directly in the core of their API.
You’d need to get to the source list of the Filters plugin. That is not possible using our official API.
Reference

JqGrid column chooser with column header

I have two questions about column chooser. firs one is that I'm using header grouping for my grid, for example I have a Display header group with two columns of Type and Size, and also another header Group which name is Storage with two sub columns of Type and size. when I using columnChooser it shows: Type Size Type Size. is there any way to prepend the column header name to them? I also named these columns DS_Size DS_Type ,.... in colModel. is there any way to use these columns colModel name instead of colNames?
my second question is that I already using erichynds multiselect (see the link) for my search section and it have conflict with the one which jqGrid use (see also). how can I rename erichynds multiselect plugin to something else? I didn't find any $.fn. in it's source code
I actually asked three questions :P but the first two are one :D
Thank you for reading my questions :)
The answer on your main question you will find in the documentation of jqGrid:
Column Chooser is not compatible with the header grouping
I wrote many parts of the Header Grouping implementation and I know the code of columnChooser. So I know how the code of columnChooser can be modified to include support of Header Grouping. The main problem is that it's relatively much work just to remove the restriction. jqGrid is free open source product. Who are ready to invest his time to remove such limitations? I spend very much my time to help other people on the stackoverflow, but I have to feed my family :-). If you really need such feature you can implement the feature yourself. The most important information which you will need to modify the columnCooser you will find in the answer.
Now about the last part of your question: "conflicts" between who multiselect widgets. Simple look in the list of changes of Eric Hynds jQuery UI MultiSelect Widget (see here) shows that the plugin is alive. On the other side another one (see here) used in columnChooser will be not changed. Nevertheless it works and can be used later. Which "conflicts" exactly you has? In the old version of Eric Hynds jQuery UI MultiSelect Widget it was used the same widget name "ui.multiselect" which was conflict. Many later versions use "ech.multiselect" name (see here). So I don't know which conflicts exactly you mean. Probebly you should just get the last version of the code.
At the end of my answer I would recommend you to read the answer where I suggested some modifications to columnChooser which allows to improve the visibility and to make the dialog of Column Chooser really resizable. One can use just $.jgrid.extend({columnChooser : function(opts) {...}}); to overwrite the original version of columnChooser to the new one.

jqgrid click local data column sort (client-side only) wipes userData on grid refresh

I have a grid that is populated by a JSON response (MVC3 controller) that has a userData component for some additional data for grid captions, etc. All that works just fine. I recently switched the the grid's data loading to "loadonce: true" as in working with larger grid results sets, I wanted client-side sorting and filtering. All that works good. BUT, I was surprised that the userData got wiped the first time I clicked any column for sorting. If I turn off loadonce, userData is fine, but it is of course going back to the server each time. The items that make use of the userData fire on gridcomplete and are now coming back "undefined" after a sort (and probably anything that reloads the grid). Any thoughts why this might be happening? Oh yeah, I also noticed that clicking a column sort wiped out any multiselections (perhaps related to the same culprit?).
Thanks,
Mark
You are right. +1 from me. It's a jqGrid bug. Inside of internal addLocalData method after the line 1527 of the file grid.base.js of jqGrid 4.1.2 or after the 1532 of jquery.jqGrid.src.js (you can get modified version from here) one should add the following line
retresult[ts.p.localReader.userdata] = ts.p.userData;
It will fix the problem. I posted the corresponding bug report here.

Save Silverlight DataGrid sort

I have a Silverlight 2.0 DataGrid that contains a list of items that needs to be refreshed in an interval to display the up-to-the-minute information. There are items in this grid that may be added and may be removed while the screen is being displayed to the current user. For Example:
If grid looks like the following, then after a minute the data needs to be refreshed because another user has added a 4th entry. (notice the sort is assending by Last Name)
Data Grid http://img16.imageshack.us/img16/1667/datagrid.jpg
Then when I get the new data set and set it to the datagrid's DataSource property, it resorts the array based on my first column like so:
Data Grid2 http://img19.imageshack.us/img19/1294/datagridb.jpg
Is there any way to reapply the sort after the data source has been updated? I'd like to save the fact that the data grid is sorted by last name, then update the data source, and then reapply the sort to the data grid. So, in the end the datagrid would look like the following:
Data Grid3 http://img13.imageshack.us/img13/4636/datagrid2.jpg
These screen shots are of course not a Silverlight data grid, but this is for simplicity in explaining the situation.
Probably the best way to go about it is to use PagedCollectionViews, although I have not tested this out myself, these classes contain a property that stores the different sorting methods applied to them. I believe that you can probably grab the current sorting element from one collection, connect to the new collection, and apply the sorting to the new collection.
For a more in depth discussion on how this all works, you can follow the explanation here
I tried using PagedCollectionViews as well as CollectionViewSources (I used the new collection to overwrite the existing source collection).
My solution isn't the most elegant, but it works. When updating the source of the DataGrid I did my own change detection.
In other words, instead of blindly overwriting the source collection I iterated through the new collection, compared each item to the existing collection, and updated the existing items where possible.
Hope that helps.
After researching how to do this, I have figured it out. I tried to implement what the others said to try, but could not get it to work in Silverlight 2.0. Thus, I searched StackOverflow and Google for more answers. ScottLogic and CodeProject seemed to be what I was looking for but I couldn't get them to work fully. So with a bit of frustration and playing around with code, I finally arrived on the solution.
If the collection that you're using for your DataGrid's ItemsSource is ObservableCollection(Of T), you can get the ability of sorting for the object, plus you can update the collection dynamically at runtime, causing the grid to refresh with the item you insert. I've created a Google Code project that is GPL for you to checkout and download. Please note that I'm using the Microsoft Silverlight 2.0 DataGrid December 2008 Release for this project. I have linked to this download on the project page as well. (The dll's required are referenced from within a lib folder inside the project).
Enjoy!
Silverlight 2.0 DataGrid Sort Project on Google Code

Resources