I have looked around and have yet to find a decent answer.
I wish to add a new row into my grid from my own custom button, without using their add buttom or edit forms.
Something like:
$("#grid").jqGrid('insert',{"id","col1","col2"});
I want to be able to programatically insert new rows and not have to use their form.
Any help would be greatly appreciated.
Regards,
Byron
Why do you not use addRowData method (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods)? Do you want do something more as to add the data?
Related
and thanks, I am creating a Suitelet in SS2, I need to filter across three selects on the client side. I was able to load the initial drop-down using 'insertSelectOption' but I cannot select any item. When I choose one it goes back to the blank option. I can't figure out what I am doing wrong. The entire list is loading in the select fine. Any help would be greatly appreciated.
thanks
You can only change the dependent dropdown lists via custom code-added form fields. I'm sure it would help if you were to post your code that you're trying to implement.
I am using Kendo UI Grid master detail template like in this docs http://demos.telerik.com/kendo-ui/grid/angular , I am able to get the template by clicking in the hierarchy cell, I want to know if there is some easy way to expand the detail template by clicking anywhere on row.
Thanks!
To do that you can follow these steps:
Add k-on-change="handleChange(kendoEvent)" to trigger the function when we select any row,
dont forget to add k-rebind="gridOptions.selectable",
and i also prefer <div kendo-grid="grid"></div> so later on we can
select the grid instance
create $scope.handleChange = function(kendoEvent){....}to handle the event
and finally here is a kendo dojo example from yours that i've modified
EDIT:
As per your comment, you simply close all expanded row first then you can open the one which is selected. Add this $scope.grid.collapseRow($scope.grid.tbody.find("tr.k-master-row")); before $scope.grid.expandRow($scope.grid.tbody.find("tr.k-master-row.k-state-selected"));. Updated dojo
I am trying to implement a dropdown+textbox kind of element in UI. Was using rich:autocomplete to achieve that. It worked, with one issue.
The client requirement is that the textbox should be able to take new values in it. i.e. If the values values are in the dropdown, it will take the dropdown values, otherwise it will take the new values entered.
Is there anyways to achieve that using rich:dropdown? Any other suggestion are also welcome. My application is using JSF2.0 + Richfaces 4.3.4.
Looking at your requirement I can suggest you can use tag input widget, see the reference link url:http://jquery-plugins.net/tag/tag-input
I want to display the select columns options outside of the grid table, by using clone method, so please help me on this one. Thank you.
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.