How to change items in select after load page ?
See original GitHub issue $("#jsGrid").jsGrid({
controller: {
loadData: function(filter) {
var d = $.Deferred();
$.ajax({
url: "url",
dataType: "json",
data : filter,
}).done(function(response) {
d.resolve(response);
});
return d.promise();
},
},
fields: [
{ name: "project", items: [{"id" : 0, "name" : "test"}], valueField: "id", textField: "name", type: "select" }
]
});
json source:
{ "data" : [{"project" : test }], "project_items" : [{"id" : 1, "name" : "test" }] }
I want to change items in “project” fields after load table. Is it possibile ?
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
jquery - change select option after 2 seconds of page load
change select option after 2 seconds of page load · 1. You can do like this : $('select[name="select1"]'). · Thank you for the...
Read more >How to change selected value of a drop-down list using jQuery?
With jQuery, it is easy to writing one line of code to change the selected value from a drop-down list. Suppose, you have...
Read more >Add, select, or clear items | Select2 - The jQuery replacement ...
Programmatically adding, selecting, and clearing options in a Select2 control. ... Select the option with a value of '1' $('#mySelect2').trigger('change'); ...
Read more >Dropdown Navigation: How to Maintain the Selected Option ...
Iterate through all options, grab their data-url attribute value, and check to see whether this value is part of the page url or...
Read more >Set Focus on <select> Element on Page Load - EncodeDna.com
This post has two examples showing how to set focus and automatically expand select dropdown option on page load using HTML5 attribute and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Have you tried to change it with
fieldOption
(http://js-grid.com/docs/#fieldoptionfieldnamefieldindex-optionname-optionvalue):@Seolhun, not sure the issue clear. Please open a separate issue and provide more details (with code snippets) or even better a jsfiddle showing the problem.