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

How to update

2 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Weilun
Top achievements
Rank 1
Weilun asked on 16 Jan 2012, 04:16 PM
I am new to telerik and i want to ask how to update in radgrid with EditMode="InPlace" and without user double-click on the row
i saw this demo (http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx) which require user to double-click the row to edit
In my case i want to update the data in RadNumericTextBox without the user double-click on the row.

This is my RadNumericTextBox
<telerik:GridTemplateColumn DataField="quantity"
                FilterControlAltText="Filter TemplateColumn column" UniqueName="quantity"
                HeaderText="Quantity" SortExpression="quantity">
                <ItemTemplate>
                    <telerik:RadNumericTextBox ID="quantityTextBox" runat="server"
                        ShowSpinButtons="True" width="50px"
                        DbValue='<%# Convert.ToDouble(Eval("quantity")) %>'
                        DataType="System.Int32" Culture="en-SG" NumberFormat-DecimalDigits="0" MinValue="0" MaxValue="999" ClientEvents-OnValueChanging="editQuantity">
                </telerik:RadNumericTextBox>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
The RadNumericTextBox ClientEvents-OnValueChanging="editQuantity" and i am stuck at the javascript.
I am not sure of how to update without getting the selected rows.

Sorry about my bad english and thank everyone for reading my problem or giving me advice/help.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Jan 2012, 06:19 AM
Hello,

You can set AutoGenerateEditColumn as true in RadGrid. This will add a GridEditCommandColumn with  Edit command name to the Columns collection.

Thanks,
Princy.
0
Weilun
Top achievements
Rank 1
answered on 17 Jan 2012, 06:52 AM
Thank Princy.
I know that by setting AutoGenerateEditColumn to true it will generate a edit colum.
Is there any other way for me trigger the update function by using the ClientEvents-OnValueChanging in my RadNumericTextBox.
Mean that if user change the value in the RadNumericTextBox it will auto update with the new value.

Thank for replying.

Tags
Grid
Asked by
Weilun
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Weilun
Top achievements
Rank 1
Share this question
or