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',
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",
dataSource: jsonNominatingCompanies,
valueKey: "NominatingCompanyID"
columnKey: "Text",
editorType: 'string',
editorOptions: { required: true }
}]
});
Please reply on the same ASAP.
Early response would be appreciated.
Thanks,
Poonam Chauhan
Hi Poonam,
Please see this thread here (http://www.infragistics.com/community/forums/p/79257/400878.aspx) as it relates to this very issue. On the thread there is a sample that you can reference as well.
I am continuing to follow your thread. Let me know if you needed any additional assistance.