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

Cascade Setting Parent Id Field Name

2 Answers 171 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 29 Jul 2013, 10:55 AM
Hi,

I am trying to workout how to use cascade feature with this hierarchical data set.

Object Type  of Brand with fields of  Id, Name
Object Type of Product with fields of Id, Name, BrandId

As you can see the Parent and Child objects have the same Primary Key name, and the parent key is the object name with Id  suffix,

From the examples I have seen and various other posts etc, I think the primary key name is is the object name with Id suffix.

I did set up with the various Id names etc and my odata call uses the Id in the filter on the Products.

/odata/products?$inlinecount=allpages&top=100&$filter=Id eq 1 

where it should have been

/odata/products?$inlinecount=allpages&top=100&$filter=BrandId eq 1 

So my question is can you specify the parent field name.  If not I think this should be an additional feature for this widget.

Regards

Richard...

 

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 31 Jul 2013, 07:58 AM
Hello Richard,

 
Basically, the child widget gets dataValueField from its parent in order to build filter descriptor. Currently, custom mapping between parent value field and child's one is not supported. You can overcome this using the parameterMap configuration of the dataSource and modify parameters.

Regards,
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Richard
Top achievements
Rank 1
answered on 31 Jul 2013, 11:24 AM
Hi Georgi,

In the end I renamed the Id fields to match the parent name.  This is now working after a day's worth of work, but it would have been nice to be able to specify the parent field name tho or at least have the documentation updated to show how to use parameter map for this use case.

Thanks

Richard...
Tags
DropDownList
Asked by
Richard
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Richard
Top achievements
Rank 1
Share this question
or