How to achieve customize templates option in jqgrid - jqgrid

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.

Related

Use hierarchical tables in SlickGrid

We have a request from our designers to build tables something like this, with rows that expand to show essentially another sub-table underneath. In KendoUI documentation, this is called "Hierarchy."
We use SlickGrid v2.3 with a few additional plugins. We currently have tables with a similar row expand/collapse like this: https://mleibman.github.io/SlickGrid/examples/example5-collapsing.html . That does not allow for a completely different set of columns in the sub-table.
The question is, can this be done in SlickGrid or not?
It might be hard to do with current SlickGrid, there's no code that handles the hierarchical part itself so that would be lot of work to implement in SlickGrid. However it is implemented in Slickgrid-Universal, which is a wrapper on top of SlickGrid. You can see Example 5 and Example 6 which shows 2 types of Tree Data grids (hierarchical or parentId refs). We use it in production for a project that we have. Also note that this is not a grid within a grid, it's rather an expand/collapse the same as what you found in example5-collapsing.html, the only differences with SlickGrid is that Slickgrid-Universal has the code to deal with hierarchical data (filtering/sorting) while SlickGrid itself doesn't and also another nice to know thing is that expand/collapse is actually using data filtering behind the scene and you can see that in the total items displayed when you have the footer enabled.
Please note that I'm the author of Slickgrid-Universal and also a major contributor to SlickGrid as well
At the moment, it can't be done. In order to achieve its speed, Slickgrid enforces a fixed row height and a single scrolling canvas. It's just a different approach than used by HTML display grids.
You could put together a workaround using mutiple slickgrids or an embedded slickgrid in a group row, I suppose, but it would be messy.
One thing I have done is develop a SlickCombo, which is essentially a grid presented as a multi-column dropdown. It's a full grid and can offer editing.
That's probably as close as you'd get.
A comment: the MLeibman repo is long dead - you should be using: https://github.com/6pac/SlickGrid

How to insert multiple rows into embedded view from a subform? Lotus Notes

I have a section that contains a subform ( containing 3 editable fields for the user ).
Then I have an embedded view categorized having two actions: Add and Trash.
What i want to do: After the user complete the 3 fields and then press Add, the first row in the embedded view will appear. ( This easy thing I did ). But then after the first click on Add, I want that all the 3 fields to be refreshed, all of them to have as their value: "".
After, if the user wants to add another row into the embedded view (with different values), in my case it is overwrited on the 1st row. I want to be separate rows in order.
I tried something with #Command(ViewRefreshFields) into the Add action code but I didn't make it to work. Please help, J. U.
Jazir, I'm guessing that you also go by the names "Florin G Mihalache", "Josh Mitchell" and "Yveniss Ltoreau", and I've been following the development of your application along with many other professional Notes developers.
I really think you need to go back to the very first basics, and work out the difference between forms, subforms, documents, views, embedded views, and other important components of Lotus Notes databases.
I strongly suspect that for a couple of weeks you have been trying to use a form to create other documents, via a subform, to be displayed in an embedded view in that form, when what you should be using is just a view, and documents. Perhaps you might need to use pages, outlines and framesets. It is very important that you understand these basic concepts before confusing the people who have tried to help you, to whom you may have lied.
I have voted your question down, not just because you have shown a lack of research, but because you appear to keep switching ID when people lose patience with you. I will undo that vote if I become convinced that you are not Florin.
The documents displayed in an embedded view are controlled by the view's selection formula. You haven't shown that. You haven't shown your code in the Add button. You haven't shown what properties you have set on the embedded view -- e.g., show single category. So you're not giving us quite enough info to diagnose your problem and help you.
But in general, I think that if you want to control the order of insertion of individual documents into an embedded list, perhaps using an embedded folder would be a better idea than an embedded view.

People Picker for MVC3

I am looking for People Picker Control similar to SharePoint one for MVC3 applications.
Can you please suggest if there are any such controls available?
What is the best approach to pick the people from AD in MVC3?
Requirement: On one of the Views, I need to select a user from AD.
I was thinking about People Picker kind of control.
Thanks
Arun
I know this is quite old so I doubt you still need this answered but perhaps it will be useful to someone else.
Just last week I had to build a control like does this for us. It's basically two main parts, a JSON service that accepts partial text and returns a list of suggestions and the HTML/CSS/jQuery+UI control.
The service is pretty straightforward so we'll skip over that here.
I'm in the process of doing a write-up on the web side but basically we wrapped the jQuery autocomplete with some custom CSS to make an input that is similar to the address line in GMail. This was done by styling a container div to look like a long input field. The actual input field is within that container and styled to be essentially invisible. Clicking in the container moves focus to the input box. Upon selecting a suggested name, I create a new container to insert before the 'cloaked' autocomplete input which contains the user name and a hidden input with our desired value to send along when the form is submitted. I had to do some other overloads on the autocomplete to get it to act consistently but essentially this is all there was to it.
The control looks at the container for a data-input-name attribute to figure out what 'name' to set the hidden inputs to when they are created with each user pick. When the form is submitted the default model binder rolls all the users of a particular picker (since you can have multiple on a page) into string arrays of the values - assuming your model has string array properties with the same name as used by the input controls - which we can then process on the server side.
By far the hardest part was figuring out the right HTML + CSS to get the look and feel right. I'm not a very strong UI person so this took me forever and still falls down in Chrome which seems to add an accent around input boxes even with (or because of?) styles which make it blend into the parent control.
For our purposes it's been working great over the last week.
UPDATE: It's now on GitHub with a Demo.

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 - Display two text boxes in one cell

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.

Categories

Resources