Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
Set selectedItem
posted

Hi,

I just want to set a certain selectedItem during PagePrerender.
My WebDropDown is databound.

cbo.SelectedItemIndex = 3

or

cbo.CurrentValue = "English"

are both ignored by the control.
Every time the page is loaded the item with index = 0 is the actual selected Item in the webDropDown.

Which attribute do I have to set to get a certain item being selected by code behind?

best regards
Andreas

 

 

Parents
No Data
Reply
  • 5105
    Suggested Answer
    Offline posted

    Hi there,

    Please set the selected index at Page_Load instead as the logic of assigning the 0 index item to selected if no selection exists is done at PreRender. Setting the selected index on page load should resolve your issue.

    Thank you for using the Infragistics forums!

Children