4 Answers, 1 is accepted
0
Amit
Top achievements
Rank 1
answered on 30 Aug 2011, 04:23 PM
I acheived the required result using the following code:
Is there a better way of doing it?
protected void rcbPerson_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
{
RadComboBoxData d = PersonBO.GetPersons((RadComboBoxContext)e.Context);
rcbPerson.DataSource = d.Items.AsEnumerable();
rcbPerson.DataTextField = "Text";
rcbPerson.DataValueField = "Value";
rcbPerson.DataBind();
e.Message = d.Message;
}
Is there a better way of doing it?
0
Hi Amit,
Let me suggest you take a look at this help article.
Kind regards,
Kalina
the Telerik team
Let me suggest you take a look at this help article.
Kind regards,
Kalina
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
0
Amit
Top achievements
Rank 1
answered on 07 Sep 2011, 10:12 PM
Thanks for your reply Kalina. I don't want to use webservice because after deployment on server it was running too slow. I posted another thread for this problem (http://www.telerik.com/community/forums/aspnet-ajax/combobox/radcombobox-too-slow-when-deployed-to-server.aspx) but no one replied. So I replaced web service with the direct combobox population in code behind.
0
Hello Amit,
In general you can continue using the approach you've posted below, or you can simplify your code by implementing a Server-Side Load On Demand - as is demonstrated here.
Best wishes,
Kalina
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
In general you can continue using the approach you've posted below, or you can simplify your code by implementing a Server-Side Load On Demand - as is demonstrated here.
Best wishes,
Kalina
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.