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

Rangevalidation GridNumericColumn in EditMode="Batch"

6 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sébastien
Top achievements
Rank 1
Sébastien asked on 26 Jul 2016, 02:10 PM

Hi,

Using the RadGrid in Batch Editing mode and the EditType is set to row.

What is the best way to implement a RangeValidation for a GridNumericColumn ? I 

I just want the user having to enter a value between 1 and 999. If this is not the case, a small message indicates the error.

Thanks in advance to show me the way :)

 

6 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 29 Jul 2016, 09:04 AM
Hello,

The easiest way for achieving the desired result is by setting the MinValue and MaxValue properties of the GridNumericColumn, which will automatically enable the range validation:
<Columns>
    <telerik:GridNumericColumn DataField="Age" MinValue="0" MaxValue="100"></telerik:GridNumericColumn>
</Columns>

As for displaying error message, this could be achieved with custom validator control. You can refer to the following demo, where you will see how RequiredFieldValidator is used, but in your case you will need CustomValidator:

Best Regards,
Konstantin Dikov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Sébastien
Top achievements
Rank 1
answered on 29 Jul 2016, 09:41 AM

Hello,

Thank you for your reply.

Ok, I will do so.

Best Regards,

S├ębastien

0
Jimmy
Top achievements
Rank 1
answered on 06 Nov 2018, 04:27 PM

Konstantin,

In the sample you posted above a red exclamation point appears briefly when a non-numeric character is entered.  We have been trying to either get that to not appear or to display something useful like "You have entered an invalid character" and stay up on the screen.  Are either of these possible?

 

Jimmy

0
Tsvetomir
Telerik team
answered on 09 Nov 2018, 10:14 AM
Hi Jimmy,

I researched the case and for your convenience and I created a KB article on the matter. You can find it here: 

Use a ToolTip as a Feedback for Input Controls as a Validation Message

The article covers in details how to create and show a tooltip using the RadToolTipManager.

Let me know if you need further clarifications.


Kind r,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
David
Top achievements
Rank 1
Veteran
answered on 02 Aug 2019, 05:42 PM

Hi Tsvetomir,

  For some reason i was unsuccessful to adopt your example for "batch" mode.

  Any recommendations?

 

0
Attila Antal
Telerik team
answered on 07 Aug 2019, 12:36 PM

Hi David,

Worth checking out the following Forum thread regarding the Batch Validation issue: Rad Grid Batch Editing Validation not working

Also, you may check the our Validation help article for RadGrid with Batch Editing. 

If the links above did not help fix the issue, I suggest that you open a formal support ticket and share more information about the current configuration. Since Tsvetomir's example is made with a Grid for other edit mode than Batch, this case may need to be addressed differently.  Once we see the current scenario/configuration you have, will be able to tell how to fix the issue or implement Tsvetomir's solution.

Later we could also share the solution in this thread to make it available for others as well.

Kind regards, Attila Antal
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Sébastien
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Sébastien
Top achievements
Rank 1
Jimmy
Top achievements
Rank 1
Tsvetomir
Telerik team
David
Top achievements
Rank 1
Veteran
Attila Antal
Telerik team
Share this question
or