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">
<NoRecordsTemplate>
</NoRecordsTemplate>
<CommandItemSettings ShowAddNewRecordButton="False" ShowExportToCsvButton="True"
ShowExportToExcelButton="false" ShowExportToPdfButton="false" ShowExportToWordButton="false"
ShowRefreshButton="False"></CommandItemSettings>
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
</RowIndicatorColumn>
<Columns>
<telerik:GridBoundColumn HeaderText="Task ID" UniqueName="MyName" DataField="IdAsInt"
ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Task Name" UniqueName="Name" DataField="Name"
ReadOnly="true" ItemStyle-Wrap="false">
<ItemTemplate>
<span style='font-weight: <%# Convert.ToBoolean(Eval("IsSummary")) == true ? "bold" : "normal"%>;
margin-left: <%# (Convert.ToInt32(Eval("Depth")) - 1) * 10%>px'>
<%# Eval("Name")%>
</span>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridNumericColumn NumericType="Number" HeaderText="Estimated Cost" DataField="ForecastCostLoc"
UniqueName="ForecastCostLoc" AllowRounding="true" DecimalDigits="0" DataFormatString="{0:#,#}">
</telerik:GridNumericColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
</EditFormSettings>
<NoRecordsTemplate>
There are no tasks to display
</NoRecordsTemplate>
</MasterTableView>
<ExportSettings Csv-EncloseDataWithQuotes="true" FileName="Forecast Costs" IgnorePaging="true">
</ExportSettings>
<ClientSettings AllowExpandCollapse="true" />
<FilterMenu EnableImageSprites="False">
</FilterMenu>
</telerik:RadGrid>
<asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Save" ValidationGroup="PRJ_WEB_PART"
/>
<
telerik:GridDateTimeColumn
FilterControlWidth
=
"140px"
DataField
=
"Datum"
HeaderText
=
"Datum"
SortExpression
=
"Datum"
UniqueName
=
"Datum"
PickerType
=
"DateTimePicker"
EnableRangeFiltering
=
"true"
CurrentFilterFunction
=
"Between"
ReadOnly
=
"True"
AllowFiltering
=
"True"
FilterListOptions
=
"VaryByDataType"
>
<
HeaderStyle
Width
=
"220px"
/>
</
telerik:GridDateTimeColumn
>
public
decimal
TotalValue
{
get
{
return
_totalValue;
}
set
{
_totalValue = value;
}
}
public
decimal
TotalHours
{
get
{
return
_totalHours;
}
set
{
_totalHours = value;
}
}
public
string
FieldActivityNameWUnit
{
get
{
return
_fieldActivityNameWUnit;
}
set
{
_fieldActivityNameWUnit = value;
}
}
public
int
ActivityMonth
{
get
{
return
_activityMonth;
}
set
{
_activityMonth = value;
}
}
public
string
ActivityMonthName
{
get
{
return
_activityMonthName;
}
set
{
_activityMonthName = value;
}
}
public
string
FieldActivity
{
get
{
return
_fieldActivity;
}
set
{
_fieldActivity = value;
}
}
protected
void
CreateYearChart()
{
RadChartProjectActivityYearly.Legend.Clear();
RadChartProjectActivityYearly.Series.Clear();
FieldActivity _activity = FieldActivityService.GetByID(Int32.Parse(ddlFieldActivity.SelectedValue.ToString()));
RadChartProjectActivityYearly.ChartTitle.TextBlock.Text = _activity.Unit +
" in "
+ ddlDetailYear.SelectedItem.Text;
List<FactProjectActivityTotalsByMonth> _factsBar1 = FactProjectActivityTotalsByMonthService.GetForYear(Int32.Parse(ddlDetailYear.SelectedItem.Text), Int32.Parse(ddlFieldActivity.SelectedValue.ToString()));
RadChartProjectActivityYearly.DataSource = _factsBar1;
RadChartProjectActivityYearly.Legend.Visible =
true
;
// RadChartProjectActivityYearly.Series[0].DataYColumn = "TotalValue";
RadChartProjectActivityYearly.PlotArea.XAxis.DataLabelsColumn =
"ActivityMonthName"
;
RadChartProjectActivityYearly.DataBind();
RadChartProjectActivityYearly.AutoLayout =
true
;
foreach
(Telerik.Charting.ChartSeries series
in
RadChartProjectActivityYearly.Series)
{
Debug.WriteLine(series.Name);
//if (series.Name != "TotalValue")
//{
// RadChartProjectActivityYearly.Series.Remove(series);
//}
}
//RadChartProjectActivityYearly.RemoveSeriesAt(2);
//RadChartProjectActivityYearly.RemoveSeriesAt(0);
<
telerik:RadChart
ID
=
"RadChartProjectActivityYearly"
runat
=
"server"
skin
=
"Forest"
Width
=
"1000px"
>
<
Legend
>
<
Appearance
Position-AlignedPosition
=
"TopRight"
></
Appearance
>
</
Legend
>
<
PlotArea
>
<
XAxis
AutoScale
=
"False"
DataLabelsColumn
=
"ActivityMonthName"
></
XAxis
>
</
PlotArea
>
</
telerik:RadChart
>
<
td
id
=
"td_grdRuleList"
align
=
"left"
style
=
"vertical-align: top; width: 700px;"
colspan
=
"2"
>
<
asp:Label
ID
=
"sds"
runat
=
"server"
Height
=
"1px"
></
asp:Label
>
<
div
id
=
"dv_memberAndRule"
runat
=
"server"
style
=
"width: 100%; display: none;"
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock20"
runat
=
"server"
>
<
table
border
=
"0"
>
<
tr
>
<
td
style
=
"width: 500px;"
>
<
telerik:RadMultiPage
runat
=
"server"
ID
=
"RadMultiPage1"
title
=
""
SelectedIndex
=
"0"
CssClass
=
"pageView"
>
<
telerik:RadPageView
ID
=
"RadPageView2"
runat
=
"server"
Height
=
"450"
>
<
table
width
=
"100%"
border
=
"0"
cellpadding
=
"0px"
cellspacing
=
"0px"
class
=
"tblspacer"
>
<
tr
>
<
td
style
=
"width: 100%;"
>
<
div
id ="Mohamed">
<
telerik:radgrid
>