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

[Solved] Combobox and User control

2 Answers 146 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
grand lorie
Top achievements
Rank 1
grand lorie asked on 15 Mar 2010, 02:35 PM
Hi

I have a user control Page which has insert form, all the controls are working fine except the radcontrols.
am i doing something wrong? or do i have to do extra work for it.

here is the code for RadControl on the userControl Page(ascx):
<telerik:RadComboBox ID="RadComboBox1" Runat="server"
                DataSourceID="SqlDataSource1"
                Text='<%# DataBinder.Eval( Container, "DataItem.CategoryName" ) %>' DataTextField="CategoryName"
                DataValueField="CategoryID" Width="160px" Skin="Sunset">
            </telerik:RadComboBox>

The Rad Control above populate the data correctly but does not bind it when update or insert.

Another Control which works fine:
<asp:TextBox id="TextBox3" runat="server"
Text='<%# DataBinder.Eval( Container, "DataItem.FullCode" ) %>' Width="200px"></asp:textbox>


i followed this example which is good, but i think Telerik should include ComboBox on it to show us how to do it;
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx

2 Answers, 1 is accepted

Sort by
0
Accepted
Simon
Telerik team
answered on 15 Mar 2010, 02:55 PM
Hello grand lorie,

Can you please describe in more detail what exactly is not working in this configuration? Do you receive any exceptions?

Does binding SelectedValue instead of the Text property solve the issue?
SelectedValue='<%# DataBinder.Eval( Container, "DataItem.CategoryID" ) %>'

Regards,
Simon
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.
0
grand lorie
Top achievements
Rank 1
answered on 15 Mar 2010, 03:07 PM
Wow Simon

That did the trick

Thanks a lot
Tags
ComboBox
Asked by
grand lorie
Top achievements
Rank 1
Answers by
Simon
Telerik team
grand lorie
Top achievements
Rank 1
Share this question
or