This is a migrated thread and some comments may be shown as answers.

Rad Combo box with Multiple Column

1 Answer 88 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Leo
Top achievements
Rank 1
Leo asked on 10 Jul 2009, 06:31 AM
Hi All,

        I am using RCB(Rad ComboBox) with Multiple Column. Now, I am facing a prob. That is if there is only one item in RCB.

       The SelectedindexChange Event won't triggered.

    
Logic:
      
    When i select an item from RCB. RG(Rad Grid) Should be reloaded.
    If only one item in RCB. Then The selectedIndexChange not Triggered. Because The first item set selected in RCB automatically.
    I used to give parameters for RG through Codebehind page i mean in selectedIndexChange event.


So i need help to wipe out this issue........
Any one Please....

-Leo
    

1 Answer, 1 is accepted

Sort by
0
Jose
Top achievements
Rank 2
answered on 14 Jul 2009, 09:14 PM
Hi Leo.

Two things:
  1. If you have more than 1 item in the RadComboBox, does the event fires? If not, have you check the AutoPostback property? it must be set to true (AutoPostback="true")
  2. If you have only 1 item in the RadComboBox, you should fill the RadGrid from code.

I'm not sure how you are filling the items for the RadComboBox, but other things you might want to consider are:
  • Add a fixed item to the RadComboBox to always have one item. The item can have the text "Select an item" and a value of -1.
  • Set the RadComboBox property AppendDataBoundItems="true" so when you bind your RadComboBox all items are added to the fixed one you have (even if there is only 1).
  • With this you can always select the item in the combo thus firing the SelectedIndexChanged event.

Hope this helps.
Jose Guay
Tags
ComboBox
Asked by
Leo
Top achievements
Rank 1
Answers by
Jose
Top achievements
Rank 2
Share this question
or