RadComboBox with WebAPI service as DataSource

4 posts, 0 answers
  1. jsearl
    jsearl avatar
    11 posts
    Member since:
    Jun 2007

    Posted 09 Oct 2013 Link to this post

    I've been looking through examples and forums and have not seen a clear example of how to bind a RadComboBox using a WebAPI service as the DataSource.  It seems that this would be supported, but I'm not having any luck getting it to work.  Thanks for any help you can provide!
  2. Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 14 Oct 2013 Link to this post


    Please find the attached sample. It demonstrates the simplest web api binding: 

    <script type="text/javascript">
        $(document).ready(function () {
            var combo = $find('RadComboBox1');
        function OnClientItemsRequesting(sender, args) {
            $.getJSON("api/items", function (data) {
                var items = [];
                $.each(data, function (key, val) {
                    var comboItem = new Telerik.Web.UI.RadComboBoxItem();
    <telerik:RadComboBox ID="RadComboBox1" runat="server" OnClientItemsRequesting="OnClientItemsRequesting"></telerik:RadComboBox>

    WebAPI controller:
    public class ItemsController : ApiController
        List<string> items = new List<string>();
        // GET api/<controller>
        public IEnumerable<string> Get()
            for (int i = 0; i < 20; i++)
                items.Add("Item " + i);
            return items;

    Here is another useful forum post. Regards,
    Hristo Valyavicharski
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. mark baer
    mark baer avatar
    142 posts
    Member since:
    Sep 2009

    Posted 12 Jun 2014 Link to this post

    How about populating a RadGrid?  Also, I know this is not Telerik specific, but what might be a decent practice for submitting a "Web Form" to a Web API Service?  Should it be done in code behind?  Straight from the web page/jquery?

  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Jun 2014 in reply to mark baer Link to this post

    Hi mark baer,

    Please take a look into the following blogs which discuss about the same scenario.

    Take a Walk on the Client Side with WebAPI and WebForms
    Take a Walk on the Client Side with WebAPI and WebForms – Part 2

Back to Top