Grid DropDown from Embedded DataSource property

2 posts, 0 answers
  1. Louis
    Louis avatar
    4 posts
    Member since:
    May 2014

    Posted 27 Aug 2014 Link to this post

    I need to have a dropdown list appear in each row of a grid that is "fed" from the DataSource of the parent grid.  I have a property in the grid datasource that is an object array.

    Below is the grid datasource.  I have a KendoGrid with a template on the "programVersion" column that creates the drop down.  I'm failing adding the data to it.  I've created (stolen and modified) an example (http://jsbin.com/cacabi/1/) that does almost what I want (I've been googling for a couple of hours).  I've included my JSON Array in the datasource to show what I'm using. 
    http://jsbin.com/cacabi/1/edit

    I basically want the Category dropdown to be populated with the programVersion data (which is different for each row).

    Any direction or guidance will be greatly appreciated.  Thanks in advance

    {
        "entityKey": "268900",
        "number": "QR000024",
        "companyDescription": "Mountain West",
        "programDescription": "Intangible",
        "programVersions": [
            {
                "versionId": 201226,
                "versionDescription": "2013WorkingCapitalBudget",
                "isCurrent": 0
            },
            {
                "versionId": 201227,
                "versionDescription": "Anotherbudgetversion",
                "isCurrent": 0
            },
            {
                "versionId": 201208,
                "versionDescription": "WorkingBudget",
                "isCurrent": 1
            }
        ],
        "$c": 1981,
        "$r": 1,
        "$checked": false,
        "$checkedEnabled": true
    }
  2. Louis
    Louis avatar
    4 posts
    Member since:
    May 2014

    Posted 28 Aug 2014 in reply to Louis Link to this post

    I solved it at http://jsbin.com/cacabi/3/edit.

    Basically I had to have a JSON Object field AND a field holding the selected value and had to drill down into the options of the editor function to get the data I needed.

    The code has two drop downs, one is the standard common one from a separate data source and the other has the embedded data source.
Back to Top