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

Required Field in In-line Grid Editing

1 Answer 793 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 05 Mar 2019, 07:13 PM

Is there a suggested way for handling required fields in In-line Grid Editing?  Currently we are handling required fields by using custom cell renders and applying styles manually.  Unlike the jQuery solutions where a required tag can be set in the model, this solutions seems clunky.

On an unrelated note ;),  is there a reason whey the DateRangePicker doesn't have a required attribute like the DatePicker?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 07 Mar 2019, 07:48 AM
Hello, James,

Currently, the approach with custom renders is the suggested one as well. The main reason is that in the React world the validation is mostly main with custom validation components. This is why there are custom reusable components that can be used in multiple Grids to match the design of the application. We design the React Grid to follow the React best practices and approaches instead of trying to copy the jQuery one. We have a wrapper for React of the jQuery to cover these cases, but still, we recommend using the native version whenever possible.

If you have any suggestions for a specific feature that can be helpful in these cases, please let me know. We are open for any feedback as we want the improve the product as much as possible. 

As for the side note, as the DateRangePicker has two different inputs, it has two separate properties for both of them:

https://www.telerik.com/kendo-react-ui/components/dateinputs/api/DateRangePickerProps/#toc-startdateinput

https://www.telerik.com/kendo-react-ui/components/dateinputs/api/DateRangePickerProps/#toc-enddateinput

This is an example:

https://stackblitz.com/edit/react-8worgq?file=app/main.js

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
James
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or