Please help modeling an object and creating a form.

Hello and thank you for any help you may provide. I have a problem that is in my head for the past week and that I can't resolve and I will appreciate any help in resolving it.

In my head I would like to classify objects by category and sub-category, and have the sub-category have object properties according to the subtype... for example

OBJECT : Motorcycle => have name like "Harley Davidson 500 Street", etc

> Category : Automotive > Subcategory : Motorcycle > THEN subcategory has a set of sub-properties like: Engine, Brand, Color, Price,

OBJECT Handbag => have name like "Gucci Guapisima Wherever Edition", etc

> Category : Clothing and Apparel > Subcategory : Brand Handbags > THEN subcategory has a set of sub-properties like: Material, Size, Color, Price,

Now the way I see it is this... Most of objects share the majority of this structure, like all objects have name, all of them belong to a category and a sub-category, now the problem comes on how to set up properties for each sub-category... for example, both objects share the Color and Price but not the other properties. How to make this non-hard-coded? in other words, we know some of the properties are shared between objects, how can we do a model like this and then put this into a form?

I could do a dictionary but in the end, how do I validate them in the form?


Thanks for any help you could provide me.


1 Reply

PM Ponmani Murugaiyan Syncfusion Team February 1, 2022 01:54 PM UTC

Hi Guillermo, 

As per your requirement, we suggest you to use the cascading support, whether drop-down list is a series of dependent DropDownList controls in which one DropDownList control depends on the parent or previous DropDownList controls. The items in the DropDownList control are populated based on an item that is selected by the user from another DropDownList control. For more information, please refer the below demo sample. 


We have prepared sample for your scenario, please find below: 

Regards, 
Ponmani M 


Loader.
Up arrow icon