javascript error

4 posts, 0 answers
  1. Ron
    Ron avatar
    113 posts
    Member since:
    Apr 2011

    Posted 22 Apr 2011 Link to this post


    I'm using a radcombobox within a edititemtemplate and I would like to get the selected item on the client side but no matter which technique I use I always recieve "Object expected error" or "Microsoft JScript runtime error: radcombobox1 is undefined". I'm new
    to rad controls I've spent all day on this , I must be doing something wrong. Can you help?

  2. Kate
    Kate avatar
    1898 posts

    Posted 22 Apr 2011 Link to this post

    Hi Ron,

    The RadComboBox for the ASP.NET AJAX controls does not have an edittemplate. You can take a look at the demo of the control. Can you provide more information on the scenario that you have. I would also suggest that you take a look at our on-line documentation for client-side properties of the RadComboBox here.

    Best wishes,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Ron
    Ron avatar
    113 posts
    Member since:
    Apr 2011

    Posted 22 Apr 2011 Link to this post

    It's embedded in the radgrid. How would I get the selected value onclientselectedindexchanged. I really appreciate your help.

     <telerik:RadGrid ID="grdInvoiceItems" runat="server" DataSourceID="objInvoiceItems"
                 Height="150px" Width="100%" AutoGenerateColumns="false" AllowAutomaticUpdates="True"
                 AllowMultiRowEdit="true"  onprerender="grdInvoiceItems_PreRender" 
                <MasterTableView DataKeyNames="Id" EditMode="InPlace"  AutoGenerateColumns="False" >
                    <%--<telerik:GridEditCommandColumn ButtonType="ImageButton">
                        <HeaderStyle Width="100px" />
                    </telerik:GridEditCommandColumn> --%>
                    <telerik:GridBoundColumn DataField="Id" HeaderText="Id" Visible="false">
                        <telerik:GridTemplateColumn HeaderText="Items" DataField="Items" UniqueName="Items"  EditFormColumnIndex="1">
                                     <telerik:RadComboBox ID="ddlItems" runat="server" DataSourceID="objItems" 
                                        AutoPostBack="true" DataTextField="Items"  DataValueField="Description"  Width="100px" Height="75"
                                                <telerik:RadComboBoxItem Text="Select Item" Value="Select Item" ></telerik:RadComboBoxItem>
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Apr 2011 Link to this post

    Hello Ron,

    RadComboBox provides a flexible client-side API. You can easily interact with the combobox in the browser using the combobox client-side object.You can attach the OnClientSelectedIndexChanged event to the RadComboBox and access the selectedItem. Here is a sample code.

    <script type="text/javascript">
        function OnClientSelectedIndexChanged(sender, args)

      <telerik:RadComboBox ID="ddlItems" runat="server" AutoPostBack="true" Width="100px"
         Height="75" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged". . . . . . .>               

    RadComboBox Object

Back to Top