This question is locked. New answers and comments are not allowed.
Hi.
I believe I have found a small bug, and have done a sample project.
Here is an example:
I have a batch editing grid that has many CurrencyTextBox / PercentTextBox element types.
These control templates are, as in the demo example, in Views/Shared/EditorTemplates.
Normally, a CurrencyTextBox or PercentTextBox that has a Max or Min value set and we enter outside those boundries, the control will automatically reset the value to an acceptable range.
In a Grid however, when the value in a CurrencyTextBox or PercentTextBox goes out of range:
1 - Yes the control background turns red to signal an error
2 - When we unselect the control, the red background, disapears.
3 - No validation message pops up
4 - The value is never automatically set to an acceptable range
I can actually try and save the invalid data. Of course the validation on the server side detects an error and stops the process from going any further, sending back a proper error message, but this I think should be caught on the client side.
You can see the error in the http://localhost:7777/grid/editingbatch page.
I added a Max field of 5000 to the template in Views/Shared/EditorTemplate/Currency.ascx
<%= Html.Telerik().CurrencyTextBox()
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
.InputHtmlAttributes(new {style="width:100%"})
.MinValue(0)
.MaxValue(5000)
.Value(Model)
%>
I added a control with the same parameters (Min/Max) outside the Grid so you can see the difference.
Try and go over 5000 in the CurrencyTextBox outside the Grid.
Try and go over 5000 in the Grid's "Unit Price" column.
-Emmanuel
I believe I have found a small bug, and have done a sample project.
Here is an example:
I have a batch editing grid that has many CurrencyTextBox / PercentTextBox element types.
These control templates are, as in the demo example, in Views/Shared/EditorTemplates.
Normally, a CurrencyTextBox or PercentTextBox that has a Max or Min value set and we enter outside those boundries, the control will automatically reset the value to an acceptable range.
In a Grid however, when the value in a CurrencyTextBox or PercentTextBox goes out of range:
1 - Yes the control background turns red to signal an error
2 - When we unselect the control, the red background, disapears.
3 - No validation message pops up
4 - The value is never automatically set to an acceptable range
I can actually try and save the invalid data. Of course the validation on the server side detects an error and stops the process from going any further, sending back a proper error message, but this I think should be caught on the client side.
You can see the error in the http://localhost:7777/grid/editingbatch page.
I added a Max field of 5000 to the template in Views/Shared/EditorTemplate/Currency.ascx
<%= Html.Telerik().CurrencyTextBox()
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
.InputHtmlAttributes(new {style="width:100%"})
.MinValue(0)
.MaxValue(5000)
.Value(Model)
%>
I added a control with the same parameters (Min/Max) outside the Grid so you can see the difference.
Try and go over 5000 in the CurrencyTextBox outside the Grid.
Try and go over 5000 in the Grid's "Unit Price" column.
-Emmanuel