Forum


11:25

Hello,
In my grid, among other columns, I have a student_id and student column, with the following config:
index: 'student_id',
hidden:true,
editable:true,
editoptions:{
hidden:true
}
index: 'student',
width: 150,
align: 'right',
editable: true,
edittype:"select",
editoptions: {
dataUrl:"note/get_students_in_class"
},
editrules:{
integer:true,
minValue:0
}
When I choose to edit a student, it loads student_id as a hidden input and the the students in a select input. What I would like to do, is select the student I'm about to edit. For this, I write:
var student_id = $("#student_id").val();
$("#student").val(student_id);
}
For the first edit, it doesn't work (it doesn't select anything), but for subsequent edits it works fine. This might be because the first time it has to create the edit form. I also tried the events: beforeShowForm, but my intention was to delay as much as possible this code, so as to load the form.
Any suggestions? Thank you!
17:36

Really weird, everything is working ok now. I can't figure out why though. I played a bit with the columns in the sql select statement (there were a couple of ids with the same name, from several tables, which I really didn't need). Maybe the php code which sent the xml to the grid, confused somehow these columns and I had some incosistent data.
Thank you!
Most Users Ever Online: 715
Currently Online:
50 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