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

Problem with SelectedValue in combobox inside grid

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vinh
Top achievements
Rank 1
Vinh asked on 16 Jul 2010, 07:13 PM
Hi,

In the EditFormTemplate or default (out-of-the-box) form, when I use the combobox with

SelectedValue

then I got the error but if I remove it then it's fine but then no item is selected.

<telerik:RadComboBox runat="server" ID="RadComboBox2" DataTextField="StateName" DataValueField="ID"
    HighlightTemplatedItems="true" Height="190px" Width="220px" DropDownWidth="420px"
    DataSourceID="sdsStates" SelectedValue='<%#Bind("ID") %>' EnableAutomaticLoadOnDemand="true"
    ItemsPerRequest="10" ShowMoreResultsBox="true" EnableVirtualScrolling="true">
    <HeaderTemplate>
        <ul>
            <li class="col1">State Name</li>
            <li class="col1">Country</li>
        </ul>
    </HeaderTemplate>
    <ItemTemplate>
        <ul>
            <li class="col1"><%# DataBinder.Eval(Container.DataItem, "StateName")%></li>
            <li class="col1"><%# DataBinder.Eval(Container.DataItem, "countryabrv")%></li>
        </ul>
    </ItemTemplate>
</telerik:RadComboBox>

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 21 Jul 2010, 03:26 PM
Hello Vinh,

I suggest that you take a look at the following demos in which is shown how to set the selected value of a combo:
User Control Edit Form
Form Template Edit Form
Combo in Grid

If the issue persists, please provide more information on the error you receive and on your scenario.

Best wishes,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Vinh
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or