JQGrid row action menu - jqgrid

Is there a way in JQ-Grid to display an icon for each row which will open a drop down menu with a list of actions/links?
Thanks

There are no standard implementation of the behavior. You can implement what you need with respect of the custom formatter.
You can try to use formatter:'actions' as alternative way. In the answer I shows how to extend standard actions buttons with custom buttons. In another answer (see the demo) I shows one more way how to implement very close behavior as formatter:'actions' do but with respect on another events.

Related

dojo comboBox automatically trigger dropdown

I am using a comboBox and for some reason the automaticall triger for the dropdown menu to appear when you have some results is not working. Is there any way to trigger this dynamically. Maybe onChange event?
I am using dojo 1.6!
A code example would be nice so as we can recommend alternatives or better solutions, but in the case that all you want to do is open a dropdown programmatically, you should find openDropDown() and toggleDropDown() functions on the combobox object. If you have the dojo source you can find more dropdown related functions in dijit/_HasDropDown.js, which combo box inherits from.

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.

Adding custom toolbar to jqgrid

How do I add custom toolbar to jqgrid.
Why I need this:
Instead of default filter toolbar I would like to introduce toolbar (Custom search options, not like editoptions:..) in my current project.
How do I implement it instead of using default filter toolbar
The searching functionality have many options (like searchoptions) which are different from editoptions. The method filterToolbar use the options and have many additional possibilities of customization, for example beforeSearch callback function. You don't describe your existing requirements, but I recommend you to examine the existing functionality of the searching toolbar more exactly before you will try to implement your own one.
If you do need implement your own custom toolbar, you can use toolbar option of jqGrid to add an empty bar above or below of the grid. You will be full responsible for the filling of the content of the toolbar.

JqGrid - Show column, depending on mode (show in Edit-mode/hide in Add-mode)

I am trying to implement a custom column which should be shown in edit-mode (as readonly), but not in Add-mode. Is there a possibility to do that?
Thanks
You can enable/disable any row of the Add/Edit dialog inside of the beforeShowForm method. Look at the answer for an example.

jqGrid using radio buttons for editable rows

I'm currently using jqGrid and ASP.Net MVC. With my current project, my goal is to provide a grid of data to the end user, and they can then edit this. The data is machine-generated, and the users will be confirming if the machine is correct or not.
I think ideally for speed, I'd like to provide a row per item, with a radio button group as the editable. The users could then pick from the values 'Unknown', 'Correct', 'Incorrect'.
As there will be a lot of data, I'd also like to provide a control of some type that can set all rows in the grid to one of the available radio button choices, for the user experience.
Given that there seems to be no native support for this in jqGrid, I wanted to ask if anyone has had any experience writing something like this, and whether this is achievable and reliable, or whether I should stick with the drop-down editable approach that is native to jqGrid.
To implement radio button as the editable instead of the standard drop-down editable approach you can use so named custom editing feature of jqGrid (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules#custom). This allows you to create any custom control to edit the cell value. An example of the implementation you can find here: Add multiple input elements in a custom edit type field.
To set all rows in the grid to one of the available radio button choices you can use either a control outside of jqGrid or add an additional custom button in the navigation bar (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_buttons). If you search for navButtonAdd you will find a lot of examples how to implement this, for example, Jqgrid: navigation based on the selected row. Because you use server based data, you can just call a method on the server to make the changes which you need and then call trigger("reloadGrid") to refresh jqGrid data.

Resources