change event of select tag in jQuery jqGrid

Hello Experts,

I want to know how to use change event of select (combobox) in jqGrid.
Can you help me about that?
boramaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

IrishPheremoneCommented:
See code examples...
// After grid loads
$("select', "#" + GridID).change(function() {
alert(this.id);
});

// Live event
$("select', "#" + GridID).live("change", function() {
alert(this.id);
});

Open in new window

0
IrishPheremoneCommented:
Sorry - bug! There are two ways to do it... after the grid loads or using jQuery's new live() function.

See code examples
// After grid loads
$("select", "#" + GridID).change(function() {
alert(this.id);
});

// Live event
$("select", "#" + GridID).live("change", function() {
alert(this.id);
});

Open in new window

0
boramaAuthor Commented:
Hello IrishPheremone,

I used your code but it seems no effect.

GridID is id of table or id of column with select tag or sth else?

Please tell me clearly about that
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

IrishPheremoneCommented:
The GridID should be the ID of the Table... Now if you remove the GridID part - all select controls should have a change event ... if that is not the case - something else is wrong.

Do you have an example page / code ?


// Live event
$("select").live("change", function() {
alert(this.id);
});

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
boramaAuthor Commented:
Hello IrishPheremone,

these are my example code:

jQuery("#table").jqGrid({
..............................
..............................
           colModel :[
                    {name:'test', index:'test', width:150, editable: true, edittype:"select", editoptions:{value:"1:1;2:2;3:3;4:4"}}, ]


I want to call one function when item of combobox "test" is changed. So I just want to know how to use change event in this combobox dynamically in IE browser.
0
boramaAuthor Commented:
Now I resolved it. But I have another thing, I have two select tag are category and subcategory combobox. When I choose one item in category combobox, all corresponding items  of subcategory combobox are also showed. But when I use setColProp of jqGrid, it has no effect when I choose one item in category combobox first but it has effect when choose secondly. Please help me about that
0
boramaAuthor Commented:
That's ok. now I got it
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.