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 Link to this post

    Hello,

    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" />
                                 </telerik:RadNumericTextBox>

     

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 22 Jun 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.




    Regards,
    Viktor Tachev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top