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

RadNumericTextBox OnValueChanged to pass CommandArgument to back-end

1 Answer 152 Views
Input
This is a migrated thread and some comments may be shown as answers.
Aron
Top achievements
Rank 2
Aron asked on 17 Jun 2016, 02:08 PM

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>

 

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 22 Jun 2016, 08:37 AM
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.
Tags
Input
Asked by
Aron
Top achievements
Rank 2
Answers by
Viktor Tachev
Telerik team
Share this question
or