tags:

views:

23

answers:

1

Hello friends.. I have three columns in the jquery grid with all three column has dropdown list boxes..

if you select first dropdown list box any value i need to enable second one.. if you senlect second I need to enable third one..using jquery...

thanks

A: 

one of the coolest things about jquery is its ability to handle events in the DOM.

the event you're looking for is .change() http://api.jquery.com/change/

the html markup for 2 select elements

<select id="first_select">
  <option value="1">1</option>
  <option value="2">2</option>
  <option value="3">3</option>
</select>
<select id="second_select" disabled="disabled">
  <option value="1">1</option>
  <option value="2">2</option>
  <option value="3">3</option>
</select>

javascript/jquery to handle changes to the select boxes

$("#first_select").change(function() {
  $("#second_select").removeAttr('disabled');
});

The second select element will be enabled when a change is made to the first. Follow this logic for the third select.

Jonathan Mayhak
Thanks.. But if my dropdown list box values will be jquery column type.. that is something like{ name: 'N', index: '', edittype: 'select',editype:true, width: 100, editoptions: { value: { 1: 'AA', 2: 'CC',3:'BD''}} }hw to handle this type of thingsThanks
kumar
can you give a link to the jquery column/grid stuff you're using
Jonathan Mayhak