filter on datasources for my foreignkey column

4 posts, 0 answers
  1. paul de Blaauw
    paul de Blaauw avatar
    14 posts
    Member since:
    Aug 2006

    Posted 05 Apr Link to this post

    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.

  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1958 posts

    Posted 07 Apr Link to this post

    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.
  3. paul de Blaauw
    paul de Blaauw avatar
    14 posts
    Member since:
    Aug 2006

    Posted 10 Apr in reply to Boyan Dimitrov Link to this post

    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.

  4. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1958 posts

    Posted 12 Apr Link to this post

    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.
Back to Top