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

LoadonDemand Problem RadCombobox with RadNumericTextbox

1 Answer 77 Views
Input
This is a migrated thread and some comments may be shown as answers.
Muhammad
Top achievements
Rank 1
Muhammad asked on 15 Aug 2012, 11:41 AM
Hi,

I am using RadNumeric Textbox inside Radcombobox and loading the products on Radcombobox using LoadonDemand. However, when I try to open the radcombobox I get the following error but this error doesn't occur if I bind my radcombobox without using loadondemand.

Is this a problem because I am using load on demand ?

Script control 'rntbInterval' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().

Parameter name: scriptControl




<telerik:RadComboBox ID="rcbProducts" runat="server" Width="300px" Height="300px" Font-Names="Arial" Font-Size="XX-Small"  
                                            Skin="Windows7" EmptyMessage="- please select a product -" HighlightTemplatedItems="true"
                                            EnableLoadOnDemand="True" EnableVirtualScrolling="True" ShowMoreResultsBox="True"
                                            Filter="Contains">
                                            <ItemTemplate>
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <asp:Label ID="lblProductName" runat="server"></asp:Label>
                                                        </td>
<td>
<telerik:RadNumericTextBox ID="rntbInterval" Font-Names="Arial" Font-Size="XX-Small"
                                                        ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true"
                                                        runat="server" Type="Number" Width="50px" NumberFormat-DecimalDigits="0" IncrementSettings-Step="1"></telerik:RadNumericTextBox>
                                                    <asp:Button ID="btnSave" Text="Save" OnClick="btnSave_Click" runat="server" /></td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                        </telerik:RadComboBox>


Protected Sub rcbProduct_ItemsRequested(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles rcbProducts.ItemsRequested
 
        Dim sFilter As String = e.Text
        Dim data As DataTable = GetProducts(sFilter)
        Dim itemOffset As Integer = e.NumberOfItems
        Dim endOffset As Integer = Math.Min(itemOffset + ITEMS_PER_REQUEST, data.Rows.Count)
        e.EndOfItems = endOffset = data.Rows.Count
        'rcbProducts.DataTextField = "JobName"
        'rcbProducts.DataValueField = "LogisticProductKey"
        For i As Int32 = itemOffset To endOffset - 1
            Dim rcb As New RadComboBoxItem
            rcb.Text = data.Rows(i)("ProductCodeAndDesc").ToString()
            rcb.Value = data.Rows(i)("LogisticProductKey").ToString()
            rcbProducts.Items.Add(rcb)
            Dim lblProductName As Label = rcb.FindControl("lblProductName")
            lblProductName.Text = data.Rows(i)("ProductCodeAndDesc").ToString()
        Next
        e.Message = GetStatusMessage(endOffset, data.Rows.Count)
    End Sub

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Aug 2012, 06:17 AM
Hi Muhammed,

Try setting the RegisterWithScriptManager property of the RadNumericTextbox to false.

ASPX:
<telerik:RadNumericTextBox ID="rntbInterval" Font-Names="Arial" Font-Size="XX-Small" ShowSpinButtons="true"
           IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" runat="server"
           Type="Number" Width="50px" NumberFormat-DecimalDigits="0" IncrementSettings-Step="1"
           RegisterWithScriptManager="false" >
</telerik:RadNumericTextBox>

Hope this helps.

Thanks,
Princy.
Tags
Input
Asked by
Muhammad
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or