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

RadComboBox SelectedValue

1 Answer 485 Views
Persistence Framework
This is a migrated thread and some comments may be shown as answers.
Rayne
Top achievements
Rank 1
Rayne asked on 27 Feb 2018, 03:54 PM

I have the following ComboBox on my page but although the Text value is persisted, the selected value is not. Therefore my grid loads all items regardless of what is in the ComboBox when the page loads. What do I need to change?

<telerik:RadComboBox runat="server" DataSourceID="AllWaterSystems" DataTextField="displayName" DataValueField="pwsid" EmptyMessage="Water System" Filter="Contains" Width="350" ID="SelectedWaterSystem" EnableItemCaching="True" OnClientDropDownOpening="RefreshHeight">
    <HeaderTemplate>
        <ul>
            <li class="col1">PWSID</li>
            <li class="col2">Name</li>
        </ul>
    </HeaderTemplate>
    <ItemTemplate>
        <ul>
            <li class="col1"><%# DataBinder.Eval(Container.DataItem, "PWSID") %></li>
            <li class="col2"><%# DataBinder.Eval(Container.DataItem, "Name") %></li>
        </ul>
    </ItemTemplate>
</telerik:RadComboBox>

 

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 02 Mar 2018, 02:48 PM
Hi Rayne,

The Selected values are not persisted by default, but you can handle that manually, keeping the selected values in a datafield which values will be used on load. This issue is discussed in details in the following thread where you can also see a sample configuraton of the suggested approach:
https://www.telerik.com/forums/radcombobox-not-retaining-selected-value-after-postback


Regards,
Vessy
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Persistence Framework
Asked by
Rayne
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or