Forum
18:55
28/12/2008
I have 2 grids on one page. One of the grids (A) has a column of edittype select that is populated by options from rows of the other grid (B: in this case I do not want to use subgrid). If the rows in B change (primarily adds and deletes), I want that to be reflected in the add/edit form in A. I am currently able to update the options, but I do not know how to do it in all cases.
I have been experimenting with various events in both grids, but still do not have a complete solution. Any ideas?
02:08
Moderators
30/10/2007
Hello,
Do you have try getColProp, setColProp methods?
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
18:07
28/12/2008
I have this same code in both grids:
loadComplete: function() {
$.get('xdb.php?oper=pulldown&entity=domain_registrar', null, function(myselects, status) {
if (status == "success")
{
var colProps = $('#domains-list').getColProp('registrar');
colProps.edittype = 'select';
colProps.editoptions = {value: myselects};
$('#domains-list').setColProp('registrar', colProps);
}
});
}
but that does not seem to do what I want, which is to update the grid containing the select pulldown based on change to the other grid.
I have the options for the grids set to reoladAfterSubmit for add, edit, and del operations.
08:43
Moderators
30/10/2007
Hello,
Ok. I understand what you mean. This will not work in your case. The problem is that you already call for the first time the edit form. This form contain the already select options. You have IMHO two possible solutions.
1. Use the code provided from you und the option recreateForm: true
This will cause every time when you cal the form to be recreated with the new values from select.
2. Check to see if the edit form exists and only modify the select option of the field. If the form does not exists it is not needed to do anything. Also you need to write your own code to update the select.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
08:55
Moderators
30/10/2007
Hello,
1.It is a new option. It is not in the pdf, but in the documentation page. I suggest to use online docs if possible. (will update the pdf soon)
2. If you are sure that the edit form already exixsts you should provide the data not as value:text;...., but as true <option value='1'>text1</option>...
then
if( $("#editmodMyGrid").html() !=null) // we have the modal
$("#myselect").empty().html(the_request_here);
}
Where MyGrid is the id of the grid and myselect is the name from colModel of the select.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
90 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66