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

Client-side access to a RadCombobox embedded in a Radtoolbar inside a Radgrid commanditem

1 Answer 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Max Petersen
Top achievements
Rank 1
Max Petersen asked on 10 Mar 2009, 10:15 AM
Thank you for a wonderfull product !

I want to access a RadComboBox client-side that is nested inside a RadToolbar which is placed in the CommandItemTemplate of a RadGrid like this (simplified):

 

<telerik:RadGrid ID="RadGridInstalled">

 

    <

 

MasterTableView>
        <CommandItemTemplate>
            <telerik:RadToolBar ID="RadToolBarAddSoftware">

 

                <

 

Items>
                    <telerik:RadToolBarButton>
                        <ItemTemplate>
                            <telerik:RadComboBox ID="RadComboBoxAddSoftware">

To further complicate matters, the radgrid is placed in a usercontrol which is loaded from the main aspx page.

I need the client-side java-script to read the value from the RadComboBoxAddSoftware when a toolbar-button is clicked.

I hope you are able to help me.

Kind regards,

Ronnie

 

1 Answer, 1 is accepted

Sort by
0
Max Petersen
Top achievements
Rank 1
answered on 10 Mar 2009, 01:51 PM

I've got it working and it was pretty much straight forward.

I put an OnClientButtonClicked="addSoftwareButtonClicked" on the RadGrid and made this function:

 

function

 

addSoftwareButtonClicked(sender, args)

 

{

 

 

var

 

item = args.get_item();

 

 

 

var

 

parent = item.get_parent();

 

 

 

var

 

mybutton = parent.findItemByValue("addsoftware");

 

 

 

var

 

mycombo = mybutton.findControl("RadComboBoxAddSoftware");

 

alert(mycombo.get_text() +

' ' + mycombo.get_value());

 

}

Tags
Grid
Asked by
Max Petersen
Top achievements
Rank 1
Answers by
Max Petersen
Top achievements
Rank 1
Share this question
or