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

filter on datasources for my foreignkey column

3 Answers 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
paul de Blaauw
Top achievements
Rank 1
paul de Blaauw asked on 05 Apr 2017, 10:01 AM

Hi,

I use the KendoGrid in Incell editmode. The foreignkey column displays the status dropdownlist. So far so good. 
However I want the datasource to be dependent on the modeldata of my grid. Each type of good has different statusses. 
Can you provide me with some help to achieve this?

In the examples I encountered the comboboxes uses the ViewData as a datasource. I can't filter on that.

 

Thanks.

3 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 07 Apr 2017, 07:58 AM

Hello,

The the Kendo UI Grid for ASP.NET MVC wrapper renders the HTML and JavaScript needed to initialize a Kendo UI widget. The foreign key builder in particular will populates columns.values with the values stored in the view data. In general the column.values work with statically defined data. 

Regards,
Boyan Dimitrov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
paul de Blaauw
Top achievements
Rank 1
answered on 10 Apr 2017, 11:56 AM

I Boyan,

 

I understand that. I'm just wondering if it is possible to filter the Dropdownlist values on a onclick/onselect. 

In my case the grid will display goods. And I want the tires to have different possible statusses than helms.

0
Boyan Dimitrov
Telerik team
answered on 12 Apr 2017, 11:36 AM

Hello,

I am not sure that I understand what you are trying to achieve. I guess that you are trying to enable filtering for the DropDownList for the foreign key column. In the  ~/Views/Shared/EditorTemplates folder ~/Views/Shared/EditorTemplates folder are stored all editor templates (including the one used for the foreign key column). I would suggest to modify the template in order to enable the filtering for the DropDownList helper. 

Regards,
Boyan Dimitrov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
paul de Blaauw
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
paul de Blaauw
Top achievements
Rank 1
Share this question
or