integration of star ranking plugins into jqgrid - jqgrid

hast anybody already integrated a star ranking plugin (eg. http://www.wbotelhos.com/raty/) into jqgrid? What is the best way to do this?
Thanks
Anatoliy

When I have done custom cells, I have either hooked into one of the grid events (afterInsertRow) or if using gridview:true then gridComplete or loadComplete.
Then simply use the setCell method to insert the html into the row.

Related

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 special Sorting

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)

Adding checkbox inside a listview in dhtmlx

How can i add check box inside combo box within the grid view.
As far as I know - it impossible, but they have similar editor type - "clist", check
http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/01_cell_types/09_pro_excell_extra.html
You can outside the grid view, like this link suggest (from the official dhtmlx forums).
But inside the grid you cannot.
The closest answer I found on the official dhtmlx forums said:
There is no special integration of combo with checkboxes and dhtmlxgrid.
"combo" column type purposed to be used with plain combobox mode only.
Technically it possible to change it , so it will render as list with checkboxes, but checked values will not be accessible through grid's API
I hope this answer could help you. If not, you should ask the dhtmlx team directly, as it does not seem to be possible without imperfect workarounds.

Attach method to all jqgrid instances?

I want to remove the pointer cursor from all non-sortable column headers in all of my jqGrids as in this answer. I currently do so for some of them in the gridComplete event.
Is there a way to set a default event, or grab all of the jqGrids on a page, and append that function the gridComplete event? I could not find anything in the options.
If you don't change the value of sortable property of the columns dynamically you don't need to do this on every grid refreshing. The columns will be created once at the creating of jqGrid. So you can just place the code which fixes the cursor on non-sortable columns after the grid definition. So you don't need to use gridComplete or any other callback.
By the way I use the word "callback" instead of "event" used in jqGrid documentation because you can define really one callback per grid. So you can't easy define somewhere in common place gridComplete with common actions and use another gridComplete in the grid definition. So if you define gridComplete as default option $.jgrid.defaults (see here) it will default till you not overwrite it in the definition of some jqGrid. To fix the problem I posted detailed suggestion how to extend functionality of jqGrid to support real events. Later I posted pull request with the changes. After long discussion the functionality is included in the code of jqGrid. So the next version jqGrid (which should be published in a short time) will do have support events additionally to callbacks.

onmouseover event in jqGrid

Do we have onmouseover event in jqGrid? That is, when the mouse is over any row in the grid.
I could not find it in the documentation.
Also, is it possible to add onmouserevent to a particular column in jqGrid?
No, there is no event in the API for this.
It might help to explain what you are trying to do - maybe there is another way...

Resources