Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
igEditor in igGrid bound to observablearray showing valueKey instead of textKey.
posted

Based on the attached example I have two questions.

1.  Why when going into edit mode does the combo editor display the valueKey vs the textKey?

2.  Why does the combo box appear but not display any of the select options?

Thanks!

  • 29417
    Offline posted

    Hello Chad ,

     

    I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

  • 1015
    Verified Answer
    posted

    looks like in your column settings you have 'options' like it is text instead of without the quotes so it would be your variable.

    In order for the grid to display your text value instead of the value:

    You need to set up a list with your text and values and use a formatter for the column to get the text for that value.

    Example:

    var lookupJobTechNameList = {}; 

    load the list:

    $.each(data.JobTechNameList, function (i, item) {

    lookupJobTechNameList[item["Value"]] = item["Text"];

    });

    in your grid setup:

    columns: [

    { headerText: "Name", key: "ContactID", dataType: "string", formatter: lookupJobTechName }, 

     

    ],

     

    in your column settings for the Updating feature:

    columnSettings: [{

                                columnKey:"ContactID",

    editorType:'combo',

                                required:true,

                                editorOptions: {  

                                    dataSource: data.JobTechNameList,

                                    textKey:'Text',

                                    valueKey:'Value',

                                    enableClearButton:true,

                                    nullText:"<--Enter-->",

                                    filteringType:"local",

                                    renderMatchItems:"multi",

                                    filteringCondition:"contains",

                                    autoComplete:false,

                                    caseSensitive:false

                                }

                            },

    Then in your formatter:

     

    function lookupJobTechName(x) {

    return lookupJobTechNameList[x];

    }