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
345
column "Surveyor" is combobobox and it is filtering on "SurveyorID". Instead, I want to filter based on the text showing in the combobox of iggrid.
posted

Hi Team,

 

I want to filter column based on text instead of an integer.

 

The column data is supplied to iggrid as integer value and reformated as

 

{ headerText: "Surveyor", key: "SurveyorID", dataType: "string", formatter: formatSurveyorCombo, width: "20%" }.

 

The column "Surveyor" is combobox and it is filtering on "SurveyorID". Instead, I want to filter based on the text showing in the grid of the combobox.

 

 Below is the sample code:

function LoadInvoiceLanguageListINGrid(datasource) {

                var showInactiveColumn = GetInactiveCheckboxValue();

                DestroyParentGrid();

                $("#gridPickList").igGrid({

                    primaryKey: "InvoiceLanguageID",

                    autoGenerateColumns: false,

                    width: "1024px",

                    renderCheckboxes: true,

                    aggregateTransactions: true,

                    updateUrl: '@Url.Content("~/PickList/SaveInvoiceLanguagePickList")',

                    columns: [

                        { headerText: "Invoice Language ID", key: "InvoiceLanguageID", dataType: "number", width: "20%" },

                        { headerText: "Surveyor", key: "SurveyorID", dataType: "string", formatter: formatSurveyorCombo, width: "20%" },

                        { headerText: "Company", key: "NominatingCompanyID", dataType: "string", formatter: formatCompanyCombo, width: "20%" },

                        { headerText: "Inactive", key: "Inactive", dataType: "bool", width: "20%" },

                        { headerText: "Text", key: "Text", dataType: "string", width: "20%" },

 

 

                    ],

                    dataSource: datasource,

                    features: [

                        {

                            name: 'Hiding',

                            enableVerticalRendering: false,

                            columnSettings: [

                                {

                                    columnKey: 'InvoiceLanguageID',

                                    allowHiding: true,

                                    hidden: true

                                },

 

                                 {

                                     columnKey: 'Inactive',

                                     allowHiding: true,

                                     hidden: showInactiveColumn //true

                                 },

 

                            ]

                        },

                        {

                            name: "Selection",

                            mode: "row",

                            multipleSelection: false,

                            touchDragSelect: false, // this is true by default

                            multipleCellSelectOnClick: false

                        },

                        {

                            name: "Sorting",

                            type: "local"

                        },

 

                        {

                            name: "Filtering",

                            type: "local",

                            mode: "simple"

                        },

 

                        {

                            name: 'Updating',

                            editMode: pickListGridEditMode,

                            enableAddRow: pickListGridEditMode == 'none' ? false : true,

                            enableDeleteRow: pickListGridEditMode == 'none' ? false : true,

                            columnSettings:

                                [

                                    {

                                        columnKey: "Inactive",

                                        editorType: 'bool',

                                    },                                    

 

                                    {

                                        columnKey: "SurveyorName",

                                        editorType: 'combo',

                                        validation: true,

                                        required: true,

                                        editorOptions: {

                                            mode: "dropdown",

                                            dataSource: jsonsurveyorName,

                                            textKey: "Name",

                                            valueKey: "SurveyorID"

 

                                        }

                                    },

                                    {

                                        columnKey: "CompanyName",

                                        editorType: 'combo',

                                        validation: true,

                                        required: true,

                                        editorOptions: {

                                            mode: "dropdown",

                                            dataSource: jsonNominatingCompanies,

                                            textKey: "Name",

                                            valueKey: "NominatingCompanyID"

 

                                        }

                                    },

 

                                    {

                                        columnKey: "Text",

                                        editorType: 'string',

                                        validation: true,

                                        editorOptions: { required: true }

                                    }]

 

                        }

                    ]

 

                });

            }

Please reply on the same ASAP.

Early response would be appreciated. 

Thanks,

Poonam Chauhan

 

Parents Reply Children
No Data