cannot get RadNumericTextblock to work in radgrid

5 posts, 0 answers
  1. mike
    mike avatar
    3 posts
    Member since:
    Aug 2011

    Posted 22 Aug 2011 Link to this post

    I'm using a radnumeric textbox as a template control in a radgrid which is in a radajaxpanel. The radnumerictextbox doesn't increment or decrement.  The grid has paging and if i move to another page the radnumeric textbox works. Also if I take the radajax panel off it also works. I'm using controls in ASP.NET Ajax Q2 2010 SP1 (Version 2011.1.519)
    Any clues ?
    <telerik:RadAjaxPanel ID="RadAjaxPanel3" runat="server" LoadingPanelID="RadAjaxLoadingPanel2" >
                        <div style="margin: 5px 15px 0 15px; ">
                            Search:<asp:TextBox ID="txtCode" runat="server"></asp:TextBox>
     
                            <asp:ImageButton ID="btnSearchParts" runat="server" ImageUrl="~/images/icons/magnifier.png" ToolTip="Search Navision" />
     
                            <div style="float:right;">
                                <b>Add Kit List:</b>
                                <telerik:RadComboBox ID="cmbKitLists" runat="server">
                                </telerik:RadComboBox>
                                <asp:Button runat="server" ID="btnAddKitList" OnClick="btnAddKitList_Click" Text="Add Kit" />   
                            </div>
                            <div style="clear:both;"></div>
                        </div>
                         
                        <br />
                        <b style="margin-left:15px;">Search Results</b>
                        <telerik:RadGrid ID="grdSearchRslts" runat="server"
                            GridLines="None"
                            AutoGenerateColumns="False"
                            AllowMultiRowSelection="False"
                            AllowPaging="True"
                            Skin="Office2007"
                            OnNeedDataSource="grdSearchRslts_NeedsData" >
                                       
                            <MasterTableView DataKeyNames="ItemNo">
                                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
     
                                <RowIndicatorColumn>
                                <HeaderStyle Width="20px"></HeaderStyle>
                                </RowIndicatorColumn>
     
                                <ExpandCollapseColumn>
                                <HeaderStyle Width="20px"></HeaderStyle>
                                </ExpandCollapseColumn>
                 
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="ItemNo" DataType="System.Int32"
                                            HeaderText="ItemNo" SortExpression="ItemNo"
                                            UniqueName="ItemNo">
                                        </telerik:GridBoundColumn>
                 
                                        <telerik:GridBoundColumn DataField="VendorItemNo" DataType="System.String"
                                            HeaderText="Vendor Part Code" SortExpression="VendorItemNo"
                                            UniqueName="VendorItemNo">
                                        </telerik:GridBoundColumn>
                 
                                        <telerik:GridBoundColumn DataField="Description" DataType="System.String"
                                            HeaderText="Description" SortExpression="Description"
                                            UniqueName="Description">
                                        </telerik:GridBoundColumn>
                 
                                        <telerik:GridBoundColumn DataField="UnitPrice" DataType="System.Decimal"
                                            HeaderText="Unit Price" SortExpression="UnitPrice" HeaderStyle-Width="50px" ItemStyle-Width="50px"
                                            UniqueName="UnitPrice">
                                            <HeaderStyle Width="60" Wrap="true" />
                                        </telerik:GridBoundColumn>
                 
                                        <telerik:GridBoundColumn DataField="UnitCost" DataType="System.Decimal"
                                            HeaderText="Unit Cost" SortExpression="UnitCost"  HeaderStyle-Width="50px" ItemStyle-Width="50px"
                                            UniqueName="UnitCost">
                                            <HeaderStyle Width="60" Wrap="true" />
                                        </telerik:GridBoundColumn>
                 
                                        <telerik:GridBoundColumn DataField="VendorName" DataType="System.String"
                                            HeaderText="Vendor" SortExpression="VendorName"
                                            UniqueName="VendorName">
                                        </telerik:GridBoundColumn>
                 
                                        <telerik:GridBoundColumn DataField="VendorNo" DataType="System.String"
                                            HeaderText="VendorNo" SortExpression="VendorNo"
                                            UniqueName="VendorNo" Visible="false">
                                        </telerik:GridBoundColumn>
     
                                        <telerik:GridTemplateColumn UniqueName="QuantityTemplateColumns" HeaderText="Quantity" DataField="Quantity" >
                                            <ItemTemplate >
                                                <telerik:RadNumericTextBox ID="upQuantityCol" runat="server" Culture="en-GB"  DbValue='<%# Convert.ToInt32(Eval("Quantity")) %>'
                                                    DataType="System.Int32" MinValue="0" ShowSpinButtons="True" Skin="Office2007"  SelectionOnFocus="SelectAll" Type="Number" 
                                                    Width="50px" Font-Size="12pt" Value="0" >
                                                    <NumberFormat DecimalDigits="0" />
       
                                                </telerik:RadNumericTextBox>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
     
                                        <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" >
                                            <HeaderTemplate>
                                             
                                             <asp:CheckBox id="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                         
                        <div style="margin: 0 15px 0 15px; margin-right:15px; float:left;">
                            <asp:Label runat="server" ID="lblSupplierTitle" Text="Supplier"></asp:Label>                       
                            <asp:DropDownList ID="drpSupplier" runat="server" AutoPostBack="true">
                            </asp:DropDownList>
                            <br />
                            <asp:Button ID="btnAddParts" runat="server" Text="Add Parts" />
                        </div>
     
                        <div style="float:left;">
                            <asp:Label runat="server" ID="lblDepotTitle" Text="Depot"></asp:Label>
                            <asp:DropDownList ID="drpSupplierDepot" runat="server">
                            </asp:DropDownList>
                        </div>
     
                        <div style="clear:both;"></div>
     
                        <br />
                       </telerik:RadAjaxPanel>





     
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 25 Aug 2011 Link to this post

    Hello Mike,

    I tried to replicate the described issue locally using the Version 2011.1.519 of Telerik radControls but to no avail. please find attached a sample runnable application which works correctly on my side. Test it locally and let me know what the difference in your case is.

    All the best,
    Maria Ilieva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. mike
    mike avatar
    3 posts
    Member since:
    Aug 2011

    Posted 25 Aug 2011 Link to this post

    Thanks for for your help, I had my script manager in a master page, I added a script manger proxy and an RadAjaxManager which now my scenario now works. 

    I have another scenario where  I have a UserControl in an an EditFormSetting in a radgrid. The control has a few buttons and another numerictextbox. None of the button or the numeric textbox work. If i have a RadPanel on page what needs to be added to the user control to make it work.
    <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server">
        </telerik:RadAjaxManager>
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelId="lpnVanStock">
                <telerik:RadGrid runat="server" ID="grdVanStocks"
                    AutoGenerateColumns="False"
                    Skin="Office2007"
                    PageSize="50"
                    OnNeedDataSource="grdVanStocks_NeedsData"
                    OnItemCommand="grdVanStocks_Command"
                    OnItemDataBound="grdVanStocks_ItemDataBound"
                    AllowPaging="True" >
                    <MasterTableView DataKeyNames="ID">
                        <Columns>
                            <telerik:GridBoundColumn DataField="ID" HeaderText="" Visible="false"></telerik:GridBoundColumn>
                             
                            <telerik:GridBoundColumn DataField="PartCode" HeaderText="Part Code" Visible="true"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="SupplierPartCode" HeaderText="Supplier's Part Code" Visible="true"></telerik:GridBoundColumn>
                            <telerik:GridCheckBoxColumn DataField="Active" HeaderText="Active" Visible="true"></telerik:GridCheckBoxColumn>
     
                            <telerik:GridEditCommandColumn EditText="Edit" HeaderText="Edit">
                            </telerik:GridEditCommandColumn>
     
                            <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton"
                                ImageUrl="~/images/icons/cross.png" Text="Delete" ConfirmText="Are you sure you want to delete this part?"
                                HeaderText="Delete" Reorderable="False">
                                <ItemStyle CssClass="ImageOptionGrid" />
                                <HeaderStyle Width="30" />
                            </telerik:GridButtonColumn>
                        </Columns>
                        <EditFormSettings UserControlName="user_controls/uc_VanStockPart.ascx" EditFormType="WebUserControl">
                            <EditColumn UniqueName="EditCommandColumn">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                </telerik:RadGrid>
             
     
         </telerik:RadAjaxPanel>
    <telerik:RadAjaxLoadingPanel ID="lpnVanStock" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 30 Aug 2011 Link to this post

    Hi Mike,

    Could you please elaborate a bit more and let me know what do you mean exactly by "None of the button or the numeric textbox work". Are you facing issues with binding the controls or editing values.
    Please refer to the followg online demo where the RadGrid is also using window for editing and the TextBoxes in the edit form work correctly. Review the example and verify what the difference in your case is.

    Greetings,
    Maria Ilieva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  5. mike
    mike avatar
    3 posts
    Member since:
    Aug 2011

    Posted 30 Aug 2011 Link to this post

    Thanks for your help, I have solved the issue which was down to a bug in the page.
    The problem was that since I'm new to telerik controls I didn't know whether I needed to add additional code or setting to the the usercontrol to handle postbacks with reference to the radajasxpanel \ radgrid \ editform scenario.  I worked out the answer was none because all the radajaxpanel is wrapped round  the radgrid. 

    This support ticket can now be closed now.
Back to Top