Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
help in selecting a select option in form editing mode
30/12/2009
11:25
Avatar
hollow
Guest
Guests

Hello,

In my grid, among other columns, I have a student_id and student column, with the following config:

name: 'student_id',
                            index: 'student_id',
                            hidden:true,
                            editable:true,
                            editoptions:{
                                hidden:true
                            }

 name: 'student',
                            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:

afterShowForm:function(frmid){
                            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!

30/12/2009
17:36
Avatar
hollow
Guest
Guests

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!

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information