pass values from grid to combo box

3 posts, 0 answers
  1. Raj
    Raj avatar
    33 posts
    Member since:
    Jan 2012

    Posted 10 Feb 2012 Link to this post

    hi friend,
    i have small problem, but it makes as big issue for me.
    my problem is i have grid with data loaded.
    on clicking the row of the grid, the data of that particular row should pass to the controls above the grid like radtextbox and radcombobox.
    i am using javascript to do this.
    i can pass values from radgrid to radtextbox, by using below code.

    var interesttype = document.getElementById("rtxtinteresttype");
    interesttype.innerText = args.get_gridDataItem().get_cell("interesttype").innerText

    but this not working for combo box.
    i tried with this one:-
    //method 1
     var currency = document.getElementById("rcmbcurrency");
      currency.innerText = args.get_gridDataItem().get_cell("currency_Code").innerText

    and this
    //method 2
    var
    item = get_Item().findElement("currencycode").innerHTML;
    var items = rcmbcurrencycode.findItemByText(Item);
    items.select();

    but i cannot bind the data from grid to combo box.
    any one can find where i made mistake in this code and how to solve this? or i want to change coding method to pass values from grid to combo box.
    thanks in advance
    S.Rajkumar
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 14 Feb 2012 Link to this post

    Hi Raj,

    When you want to set value or text to the RadComboBox, you should first get reference to its client-side object and not its DOM element.

    Please refer to the following help article here, showing the basics on how to work with the RadComboBox's client-side object. Also you could have a look at the following two help article here and here.

    All the best,
    Dimitar Terziev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 15 Feb 2012 Link to this post

    Hello Raj,

    Attached is a small sample that should provide you with guidelines on your implementation.
     
    Regards,
    Tsvetoslav
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top