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.
Related
when I select (say customer) using Dropdown I would want to show users all the properties on a side table or division. Essentially, displaying the selected customer's fields on the same page for the users to verify/read.
I am using laravel-backpack for development and finding it difficult to implement. Any help is greatly appreciated.
I'm afraid there's no existing way to achieve that, you'd have to code it.
But you don't have to start from scratch, you can use the code for the select2 field (or whatever field you prefer) and create a new field type, say select2_and_preview by tweaking the Javascript inside that one file.
There's recently been a Feature Request for a similar feature (see here), you might want to pitch in with your opinion if you want it created by the team, and included in the official build.
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!
I am having a grid whose configuration is placed in server for purely customizing sake where User can decide which columns he need to view and save the template.
Now if I want to have this feature present in grid whose configuration is also maintained in client side. How do I achieve it.
Pardon me if I m not clear or being a noob, I am still learning jqgrid .
Your question is too common formulated. I would recommend you to read the answer, this one and this one which shows how the user could save the state of grid and to hide some columns, to change there width or order the columns. If I understand your question correctly, then the answers will provide you the main ideas for the implementation of your requirements. You can just try the demo, make some changes in the grid and then close the demo and visit the demo once more. You will see that the hidden columns stay hidden, the order and the width of columns will stay persistent and so on.
I have this data presented in a view with a jqGrid table.
It has a complex sorting order of rows done server side.
Now I need to be able to do some "free" sorting of the rows at the View.
By free I mean that the client needs to be able to move a row up or down to any place they want, skipping all the other sorting rules done at server.
Of course, this will need to be saved to the database later.
I thought that maybe add a column with an Up and Down arrow, that when clicked it will move the row to where it needs to be.
I'm not at my best with JavaScript, and I can't seem to find any examples of something similar to this anywhere.
Any tips on how could I approach do this?
Or is there a better option?
Thanks.
There is the Sortable Rows feature built into the jqGrid.
You set it up with the following API call:
jQuery("#yourgridid").jqGrid('sortableRows', options);
It uses the jquery-ui Sortable widget for this so the optional options parameter can be used for any of the available options for the widget which you can find here.
For Example:
jQuery("#yourgridid").jqGrid('sortableRows', { cursor: 'crosshair' });
You can see a sample of this on the Demo page. (New in Version 3.6 -> Sortable Rows)
Is it possible to display two editable text boxes in one cell of the JqGrid
Sorry, but the description of the problem in the comment to your question still don't contain any examples which shows why you have to display two text boxes in one cell. Moreover you still not answered on the question: which editing mode you use?
The problem is the following: if you use some software product you can use a lot of its standard features. In the case the implementation will be short and you can make very nice solution writing very small code. If you one the other side would try just follow your original imagination of how all should looks like you can spend many time and to write a lot of code. As the result from the point of view of the user who will work with your site all will be almost the same as in the simple solution. Is it really required?
If you would use form editing for example you can easy display additional textboxes, checkboxes or textareas from hidden columns. jqGrid automatically create controls for all hidden columns which have editable: true property. So what you need to do in the case is just to show hidden field in the form with respect of $.show (like in the answer).
I used the same concept in "trirand.com/blog/jqgrid/jqgrid.html#";
There in the Row editing --> Custom edit, JqGrid demo examples, its displaying three buttons on a one cell.