Selected Index event in combo box

Selected Index event in combo box

  

Hi Team,

I'm designing a small  app just want to know how selected index events will work for combo box based on conditions.


Regards,


Chandrasekar.R

Hi chandrasekar,

Can you explain what you trying to achieve in detail.

Cheer,

Rocky 

Rocky wrote:

Hi chandrasekar,

Can you explain what you trying to achieve in detail.

Cheer,

Rocky 


say for eg i have two combox box  one is cmbtype and another one is cmbprovider,

Intially during page load i'm setting cmb provider combo box enable to false.


So when i'm selecting a value from cmb type the cmbprovider combo box should enable.

hi Chandrasekar,

on cmbtype you need to have an action onChange. On that action you need to change the variable that is making the cmbprovider disable and ajax refresh cmbprovider.

Let me know if you need more explaination

Regards,

Marcelo

Marcelo Ferreira wrote:

hi Chandrasekar,

on cmbtype you need to have an action onChange. On that action you need to change the variable that is making the cmbprovider disable and ajax refresh cmbprovider.

Let me know if you need more explaination

Regards,

Marcelo

Hi Marcelo,

Can u give me an example solution.


Regards,


Chandrasekar


Hi Marcelo,


Can you explain me in detail with some sample solution.


Regards,

Chandrasekar.R

Hi,

In attachment a really simple example of what I was talking about.

Regards,

Marcelo

Hi Chandrasekar,

Define one local boolean variable and keep its default value as False.

On second combobox, for Display property give that variable.


for first combobox take onchange event


Inside onchange assign true to that variable and ajax refresh second combobox.

Let us know if this helps.

Thanks and Regards,

Suraj Borade

BTW Marcelo published the post when I was typing. :)

Hey thanks Marcelo and Suraj for helping me.


Please find my attachment.


My Conditions are if you see the code

1.If provider name is 'Airtel' i need only Prepaid and postpaid to display from Provider Type combo box and the rest should not be enable.


similarly if provider name is 'HDFC' i need only Savings and current to display from Provider Type combo box.



Regards,

Chandrasekar.R



Hi,

what you need to do is to have a table between Providers Name and Type to decide which Types are available to each name. than on the onchange of the providerName you need to put a query that gets the types for that name. I changes your espace a bit with an example. disclaimer i wasnt able to publish it.

Regards,

Marcelo