jQgrid multiselect with dynamic changed cell value based on dropdown selection - jqgrid

I just found that sample
http://www.ok-soft-gmbh.com/jqGrid/DataToMultiSelect2.htm
I want to have something similar:
I want to be able to post selected values on server and also i want to have a dropdown and based on that dropdown selection another cell value of that row gettign changed
How can i do that?
|Id|Dropdown|ValueChangedOnDropdownChanged|
1 A[A/B] A selected
2 B[A/B] B selected
*[A/B] it is dropdown options

I am not sure that I understand your question correct. The demo which you reference in your question I created before for the answer and this one.
Look at the another old demo. It shows how to implement dependent select (dropdown) list. The demo shows how to it in inline editing, form editing and the searching toolbar. In case of the usage of server base data you will have to use dataUrl and buildSelect to implementation of the same behavior. The dataUrl should be used instead of the v property of the searchoptions or editoptions. The buildSelect can be used ton only to modify the server response, but just as the good place to rebuild the dependent select (dropdown list).

Related

how can i get inbuilt value during Add process of jqgrid?

I am using jqGrid and when I want to enter new values,I click on Add(+) button which is at bottom of grid.I have 7 filed and out of them 1 is dropdown list so,
whenever I want to add new record I want that dropdown field to be filled automatically. How do I achieve that ?
I'm not sure what you exactly mean. Du you use inline editing (inlineNav) or form editing (navGrid)? Which version of jqGrid you use and from which fork of jqGrid (free jqGrid, which I develop, commercial Guriddo jqGrid JS or an old jqGrid in version <=4.7). You wrote about "dropdown field to be filled automatically", but the information can be interpreted in different ways. I try to guess.
I suppose that you should include defaultValue in editoptions to fill (or to choose in the dropdown) the default value in the filed new filed. It will work in case of usage form editing. It could work in some cases of usage inline editing (inlineNav) too, but one should know more details about your implementation.

How to appened Data in JQGrid table Cell?

I have created JQGrid.
I have put the Data in cell and one html Link in cells.
OnClick of that link I need to open JQGrid Specific popUp.Popup have one combobox .I'll select one option and click submit button and that data needs to be appear in clicked cell.
Thanks
The construction which you suggest seems me too complex. Probably you can consider to use more simple user interface?
Nevertheless you can just use setCell method to set new contain of the cell of the grid.

jqgrid - dynamically load different colModel edittypes(Text box and check box) in two rows of same column

I'm doing some R&D work on displaying different colModel edittypes(Text box and check box) in two rows of the same column in a JqGrid. Because I need to display different edit-types for a same column depending on the back-end database values. Its possible to display different edit-types for different columns. Please help me on this to carry out my R&D work.
You don't explained which editing mode you use. The solution of the problem can be different depend on the editing mode.
I would you recommend to change the properties of the column, for example the edittype value, directly before the editing of the row be started.
In case of form editing you can change the properties inside of call . In the answer are shown how to show of hide some column property inside of beforeShowForm callback. Another answer or this one are examples of the usage beforeInitData which seems be the best for your case. Inside of beforeInitData you can change any properties of colModel before the form will be constructed.
Typical usage of inline editing consist from the calling of editRow inside of onSelectRow or inside of ondblClickRow. So one can use setColProp method for example to change column properties before there will be used. See examples here and here.

How do I edit a jqgrid from javascript

I have a jqgrid that has several columns including a checkbox column that indicates if an item is selected.
Underneath that I have a dropdown menu and a text box. The idea is that each item in the dropdown menu is a column in the jqgrid. Then all I need to do is modified all of the checked rows with the contents of the text box for that column. So a quick mass update mechanism if you will.
The problem is, is that I can't figure out how to update a specific cell. Any tips or documentation that can help me? Thanks!
You can use for example setRowData (see jqGrid documentation) or setCell to update the data in the grid. The functions getCol, getCell or getRowData could help you the examine the row data. Another old answers: this and this could be helpful if you decide to search data in the grid with respect of jQuery.
Here's the "answer" I came up with to my problem. I wanted to edit only rows that were editable. Using setCell would overwrite my editable field with a non-editable one. So I looked at the HTML for a given row while it is in the edit state and passed that into the 'setCell' method. It feels 'hackish' though and if someone knows a better way, I'm all ears.

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