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

Problem with GridnumericColumn and tab key

0 Answers 57 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
andy asked on 05 Oct 2012, 12:55 AM

I have a Radgrid with a couple of numeric columns. The grid is in multi-edit mode, and when the user hits Save button, I loop through the grid, and call GridEditableItem.ExtractValues to get the values to save back to the database.

The issue is that when a user is entering a value in the textbox (for the gridnumericcolumn) and does not tab off that textbox and hits the save button, the value does not get saved. If the user tabs off, the entered value is formatted and when the user hits Save button, value gets saved as expeced. The issue is easily reproducible. I am using Telerik v2.0.50727

The markup is:
<telerik:RadGrid Skin="Web20" ID="RadGrid1" runat="server" OnItemCreated="RadGrid1_ItemCreated"
    OnItemDataBound="RadGrid1_ItemDataBound" OnNeedDataSource="rgTasks_NeedDataSource"
    AllowMultiRowEdit="true" ShowStatusBar="false" Width="100%" GridLines="Both">
    <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" ShowFooter="false"
        ShowGroupFooter="false" ShowHeadersWhenNoRecords="false" AllowSorting="true"
        GridLines="Both" DataKeyNames="Id" Width="100%" AutoGenerateColumns="false" EditMode="InPlace"
        TableLayout="Auto" CommandItemDisplay="Top">
        <CommandItemSettings ShowAddNewRecordButton="False" ShowExportToCsvButton="True"
                    ShowExportToExcelButton="false" ShowExportToPdfButton="false" ShowExportToWordButton="false"
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <telerik:GridBoundColumn HeaderText="Task ID" UniqueName="MyName" DataField="IdAsInt"
            <telerik:GridTemplateColumn HeaderText="Task Name" UniqueName="Name" DataField="Name"
                ReadOnly="true" ItemStyle-Wrap="false">
                    <span style='font-weight: <%# Convert.ToBoolean(Eval("IsSummary")) == true ? "bold" : "normal"%>;
                        margin-left: <%# (Convert.ToInt32(Eval("Depth")) - 1) * 10%>px'>
                        <%# Eval("Name")%>
            <telerik:GridNumericColumn NumericType="Number" HeaderText="Estimated Cost" DataField="ForecastCostLoc"
                UniqueName="ForecastCostLoc" AllowRounding="true" DecimalDigits="0" DataFormatString="{0:#,#}">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            There are no tasks to display
<ExportSettings Csv-EncloseDataWithQuotes="true" FileName="Forecast Costs" IgnorePaging="true">
    <ClientSettings AllowExpandCollapse="true" />
    <FilterMenu EnableImageSprites="False">

<asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Save" ValidationGroup="PRJ_WEB_PART"

No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question