RadNumericTextBox OnValueChanged to pass CommandArgument to back-end

2 posts, 0 answers
  1. Aron
    Aron avatar
    80 posts
    Member since:
    Dec 2005

    Posted 17 Jun 2016 Link to this post


    I would like to use the RadNumericTextBox as a way to change the quantity of items in a cart.

    How can pass the OrderItemId to the back-end C# for logic to happen?


    <telerik:RadNumericTextBox OnTextChanged="QuantityChanged"  runat="server" Width="30" MinValue="1"
                                     Visible='<%# AllowEditQuantity(Eval("Item.ProdType"), Eval("Show.EventType")) %>'
                                     Value='<%# decimal.Parse(Eval("Item.Quantity").ToString())%>'
                                     CommandArgument='<%#Eval("Item.OrderItemId") %>'>
                                     <ClientEvents OnValueChanged="squareValue"/>
                                    <NumberFormat DecimalDigits="0" />


  2. Viktor Tachev
    Viktor Tachev avatar
    2342 posts

    Posted 22 Jun 2016 Link to this post

    Hi Aron,

    To update the value in the data source you would need to access the value that is entered in the numeric input control. Please examine the following article that describes how you can access controls that are placed inside grid cells.

    Also check out the article below that illustrates how you can update the data for RadGrid manually.

    Viktor Tachev
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top