Welcome Guest Search | Active Topics | Sign In | Register

Combobox not being updated after listbox item change Options
Joan Darling
Posted: Monday, March 14, 2016 10:36:15 AM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
I have a combobox that has a listbox in it's dropdowntemplate. I use a callbackpanel to load the listbox's selecteditem but when the callback returns to the client the change is not reflected in the combobox. I've looked around but I don't see a way to sync the combobox with the listbox after a change is made.

Server Side Code
Code: Visual Basic.NET
For Each li As EO.Web.ListBoxItem In EditMessage_lsbSeverity.Items
    If CInt(li.Value) = msg(msg.GetKey(1)).MsgSeverity Then
        li.Selected = True
        Exit For
    End If
Next
Joan Darling
Posted: Tuesday, March 15, 2016 9:49:24 AM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
I found the answer to my question. I was just going to set the combobox's text property and await your answer and low and behold setting the text property to the listitem's text property synced the icon. The changed code is below for other that may experience it.

Code: Visual Basic.NET
For Each li As EO.Web.ListBoxItem In EditMessage_lsbSeverity.Items
    If CInt(li.Value) = msg(msg.GetKey(1)).MsgSeverity Then
        li.Selected = True
        EditMessage_cboSeverity.Text = li.Text
        Exit For
    End If
Next

eo_support
Posted: Tuesday, March 15, 2016 10:07:42 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
I am glad that you found the solution and thank you very much for sharing!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.