Forum

July 12th, 2025
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
navGrid events in form
21/06/2011
11:19
Avatar
serge
Member
Members
Forum Posts: 3
Member Since:
21/06/2011
sp_UserOfflineSmall Offline

is it impossible to operate with events in a form in JQGrid?
i have 2 lists, values from second list must be change after changing values in a first list.
how can i do it in a form edit in JQGrid?

22/06/2011
12:37
Avatar
kuafusoft
Member
Members
Forum Posts: 27
Member Since:
31/12/2009
sp_UserOfflineSmall Offline

You can define an event (onchange?) in editoptions of the first column (first list) to change the second list. Hope it helps.

for example:

         'cq_ct_comment.group'=>array('editable'=>true, 'label'=>'Group', 'align'=>'center', 'editoptions'=>array('style'=>'width:100px'),
                'edittype'=>'select',  

'editoptions'=>array('onchange'=>'javascript:group_changed(this, event)', 'value'=>array(' ', 'LINUX'=>'LINUX', 'WINCE'=>'WINCE', 'MULTIMEDIA'=>'MULTIMEDIA', 'ANDROID'=>'ANDROID', 'PM'=>'PM', 'OTHERS'=>'OTHERS')),
                'stype'=>'select', 'searchoptions'=>array('value'=>array(' ', 'LINUX'=>'LINUX', 'WINCE'=>'WINCE', 'MULTIMEDIA'=>'MULTIMEDIA', 'ANDROID'=>'ANDROID', 'PM'=>'PM', 'OTHERS'=>'OTHERS')),
                ),

I use php to generate the jqgrid config:)

The function group_changed is defined in javascript and you can do anything you want.

23/06/2011
09:17
Avatar
serge
Member
Members
Forum Posts: 3
Member Since:
21/06/2011
sp_UserOfflineSmall Offline

{name:"nm_id", index:"nm_id", edittype:'select', stype:'select', formatter:'select', editable:true,
editoptions:{onchange:'group_changed()', value:data[0]}, width:120}
{name:"ma_idnmx", index:"ma_idnmx", edittype:'select', stype:'select', formatter:'select', editable:true,
editoptions:{value:data[1]}, width:120}

Thank, event really are operated correctly, but function
function group_changed(){
$("#my_grid").setColProp('ma_idnmx', { editoptions: { value: "1:one;2:two;3:three"} });
}
don't realize renovation in a list, what we want.

next reference cause alarm for me, that it is not possible:
http://www.trirand.com/blog/?page_id=393/help/setcolprop-editoptions-does-not-update-drop-down-in-search-toolbar/

29/06/2011
09:50
Avatar
serge
Member
Members
Forum Posts: 3
Member Since:
21/06/2011
sp_UserOfflineSmall Offline

don't lost a hope, i found next:

http://demo.koolphp.net/Exampl...../index.php + Add New Record.

it is enough for decision.
but unfortunately Wiki say about impossibility same realization in JQGrid.

Sorry.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
22 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