This question is locked. New answers and comments are not allowed.
What are some best practices to follow when creating editor templates from Telerik controls?
Here are a few scenarios I can think of:
So some (I'm sure there are many more) of the concerns here that I'd like to make sure we handled were:
I'd love to start building a good UI framework of reusable components where the reusable components' implementation is based on Telerik's components, but I'm not quite understanding how. If we were still with ASP.NET, I'd simply create a user control with custom properties and events and this would be easy. Not so much with MVC editor templates, though.
Thanks!
-Shane
Here are a few scenarios I can think of:
- "DatePicker.ascx" as the standard Editor Template for Date properties (where you only want a date and not a time)
- "ProductPicker.ascx" as the standard Editor Template for binding to an Order.LineItem.Product property. This could use a ComboBox with AJAX/JSON query to populate it on demand, and perhaps using type-ahead functionality to search from millions of products.
- "ProductList.ascx" as the standard Display Template for a collection of products. This could use a grid with sorting/paging/filtering functionality and apply to an Order.Products property.
- etc...
So some (I'm sure there are many more) of the concerns here that I'd like to make sure we handled were:
- Efficient javascript without naming collisions (i.e. we don't have N copies of every OnChange handler)
- Reusable editor templates without naming collisions for the various elements
- Reusable editor templates where I can hook into common clientside events (onchange, specifically, and get the selected value)
I'd love to start building a good UI framework of reusable components where the reusable components' implementation is based on Telerik's components, but I'm not quite understanding how. If we were still with ASP.NET, I'd simply create a user control with custom properties and events and this would be easy. Not so much with MVC editor templates, though.
Thanks!
-Shane