Handsontable sort Dropdown items by date - handsontable

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

Related

Sort by clicking on column not displaying

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!

Multi-column sorting for a repeat control having its source as document collection

Don't know whether it is possible but is there way in which I could provide multi-column sorting in a repeat control which displays field values from a document collection?
The easiest way to get the multi-column sorting is to use a Data Grid.
Out of the Extension Library box you can use the Dojo Data Grid control. Brad Balassaitis wrote a good description how to use it in his blog Xcellerant. There you can find a link to an example database too. A good starting point is the XPages "REST_DojoGrid" in database XPagesExt.nsf which is included in Extlib download also.
As an alternative you could use data grids based on jQuery like jqGrid.
You could do a lot of complicated stuff, like putting docs into a java TreeMap object in order to sort them on the fly.
Or you simply use jQuery and the tablesorter plugin: http://tablesorter.com/docs/

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.

How to construct Dynamic Dependent Combo series in jqGrid?

I have two combos in my jqGrid. One has the listing of Countries and the other has the listing of states of that country. I want a system where when I change the Countries combo the corresponding value of that Country's State will construct the second combo.
Is a detailed example available?
With thanks for Oleg and to help others who are searching the same solution, the solution is as follows.
Look at the demo from this answer, or at the another demo from another answer.

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