Hi,
I believe this to be a bug in the ribbon bar (I am on version 2012.2.724.40). I have a ribbon bar with a RibbonBarButton called "Save" on it. When the user clicks save, all fields on the current screen are saved to the database. However, I have found that for telerik fields on the screen (I've reproduced with RadNumericTextBox, RadTextBox, and RadDatePicker, see below code), if the user does not tab off of the field before clicking the ribbon bar button, that the value entered does not save and reverts back to the previous value. This behavior does not occur if you use a regular asp.net button. My code to reproduce this is below, I have included a radnumerictextbox, raddatepicker, and a regular asp.net textbox. The regular asp.net textbox always shows correctly, however the telerik ones do not. If this is indeed a bug, is there a workaround until a fix is available? I know it seems minor but we have customers who do much data entry, and little things like this can cause big issues.
The steps to reproduce are:
1. Enter a value in the rad numeric textbox, say 50. Tab off (or at least set focus somewhere else), then click 'save' in the ribbon bar. The alert message shows '50' as expected.
2. Now change the value to '100'. Do not tab off the numeric textbox, but instead keep focus. Click 'save' in the ribbon bar. The alert shows '50' instead of '100', and the value reverts back to '50' in the textbox as well.
Thank you!
Richard
I believe this to be a bug in the ribbon bar (I am on version 2012.2.724.40). I have a ribbon bar with a RibbonBarButton called "Save" on it. When the user clicks save, all fields on the current screen are saved to the database. However, I have found that for telerik fields on the screen (I've reproduced with RadNumericTextBox, RadTextBox, and RadDatePicker, see below code), if the user does not tab off of the field before clicking the ribbon bar button, that the value entered does not save and reverts back to the previous value. This behavior does not occur if you use a regular asp.net button. My code to reproduce this is below, I have included a radnumerictextbox, raddatepicker, and a regular asp.net textbox. The regular asp.net textbox always shows correctly, however the telerik ones do not. If this is indeed a bug, is there a workaround until a fix is available? I know it seems minor but we have customers who do much data entry, and little things like this can cause big issues.
The steps to reproduce are:
1. Enter a value in the rad numeric textbox, say 50. Tab off (or at least set focus somewhere else), then click 'save' in the ribbon bar. The alert message shows '50' as expected.
2. Now change the value to '100'. Do not tab off the numeric textbox, but instead keep focus. Click 'save' in the ribbon bar. The alert shows '50' instead of '100', and the value reverts back to '50' in the textbox as well.
Thank you!
Richard
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadRibbonBar
ID
=
"BaseRibbonBar"
runat
=
"server"
OnButtonClick
=
"BaseRibbonBar_ButtonClick"
EnableAjaxSkinRendering
=
"true"
Visible
=
"true"
Skin
=
"Windows7"
>
<
telerik:RibbonBarTab
Text
=
"Basilisk"
>
<
telerik:RibbonBarGroup
Text
=
"Actions"
Value
=
"Actions"
>
<
Items
>
<
telerik:RibbonBarButton
Size
=
"Large"
Value
=
"Save"
Text
=
"Save"
ImageUrlLarge
=
"~/save.png"
ImageUrl
=
"~/Images/save.png"
ToolTip
=
"Save the current record"
/>
</
Items
>
</
telerik:RibbonBarGroup
>
</
telerik:RibbonBarTab
>
</
telerik:RadRibbonBar
>
<
telerik:RadAjaxPanel
runat
=
"server"
ID
=
"testPanel"
>
<
telerik:RadNumericTextBox
ID
=
"tbMonths"
runat
=
"server"
Width
=
"40px"
>
</
telerik:RadNumericTextBox
>
<
telerik:RadDatePicker
runat
=
"server"
ID
=
"datepicker"
></
telerik:RadDatePicker
>
<
asp:Button
runat
=
"server"
ID
=
"btnTest"
OnClick
=
"btnTest_Click"
Text
=
"Save"
/>
<
asp:TextBox
runat
=
"server"
ID
=
"Asptest"
></
asp:TextBox
>
</
telerik:RadAjaxPanel
>
protected
void
btnTest_Click(
object
sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(
this
, GetType(),
"Test"
,
"alert('result is "
+ tbMonths.SelectedDate.ToString() +
"');"
,
true
);
}
protected
void
BaseRibbonBar_ButtonClick(
object
sender, Telerik.Web.UI.RibbonBarButtonClickEventArgs e)
{
ScriptManager.RegisterStartupScript(
this
, GetType(),
"Test"
,
"alert('ribbon result is "
+ tbMonths.Value.Value.ToString() +
"');"
,
true
);
}