Filter List Does not Show all of the values.

In My gird I have a column called Location When I click on the filter option and scroll through the list some of the values are not shown, however, I can type in the value and it will appear. Why do all the values not appear in the list?

Truck 60 should appear in this list, it does not



If I type Truck 60 in the Search box it Shows it and I can view the results.

Code:

<ejs-grid id="ToolGrid" dataBound="dataBound" height="510px" allowPaging="true" allowSorting="true" allowFiltering="true" allowGrouping="true" allowReordering="true" allowResizing="false" allowMultiSorting="true" allowPdfExport="true" allowExcelExport="true" showColumnChooser="true" toolbarClick="toolbarClick" printComplete='printComplete' actionComplete="actionComplete" actionBegin="actionBegin" actionFailure="actionFailure" toolbar=toolbarItems>

        <e-grid-groupsettings></e-grid-groupsettings>

        <e-grid-filterSettings columns="filterColumns" type="Excel"></e-grid-filterSettings>

        <e-grid-pagesettings pageCount="6" pageSize="16" pageSizes="@(new string[] {"5", "10", "16", "20", "All"})"></e-grid-pagesettings>

        <e-grid-sortsettings columns="cols"></e-grid-sortsettings>

        <e-grid-editSettings allowAdding="true" allowEditing="true" mode="Dialog"></e-grid-editSettings>

        <e-data-manager json="@Model.Tools.ToArray()" insertUrl='@Url.Action("AddTool", "Home")' updateUrl='@Url.Action("UpdateTool", "Home")' adaptor="RemoteSaveAdaptor"></e-data-manager>

        <e-grid-columns>

            <e-grid-column field="Test" headerText="Add Test" template="#test" allowFiltering="false" width="80"></e-grid-column>

            <e-grid-column field="LocationDescription" headerText="Location" valueAccessor="locationAccessor" width="120"></e-grid-column>

            <e-grid-column field="ToolID" headerText="ID" valueAccessor="idAccessor" isPrimaryKey="true" width="50"></e-grid-column>

            <e-grid-column field="LocationID" headerText="Location" visible="false" editType="dropdownedit" edit="@(new {create = "createLocation", read = "readLocation", destroy = "destroyLocation", write = "writeLocation"})" width="50" validationRules="@(new {required = true})"></e-grid-column>

            <e-grid-column field="ReferenceID" headerText="Reference" visible="false" editType="dropdownedit" edit="@(new {create = "createReference", read = "readReference", destroy = "destroyReference", write = "writeReference"})" width="50"></e-grid-column>

            ...

        </e-grid-columns>

    </ejs-grid>


Script

function locationAccessorFn(field, data, column) {

        var value = data[field];

        if (data["LocationID"] === 1) {

            value = "Truck " + data["ReferenceID"];

        }

        if (data["LocationID"] === 2) {

            for (var i = 0; i < substationData.length; i++) {

                if (data["ReferenceID"] === substationData[i].substationID) {

                    value = substationData[i].name;

                }

            }


        }

        if (data["LocationID"] === 3) {

            value = "Warehouse A";

        }

        if (data["LocationID"] === 4) {

            value = "Warehouse C";

        }

        if (data["LocationID"] === 5) {

            value = "Office";

        }

        if (data["LocationID"] === 28) {

            value = "Warehouse B";

        }

        return value;

    }



1 Reply

RS Rajapandiyan Settu Syncfusion Team January 27, 2022 08:18 AM UTC

Hi Danyelle, 

Thanks for contacting Syncfusion support. 

By default the Excel/ Checkbox filter Dialog in the Grid will display the distinct data from the first 1000 records in grid dataSource to optimize the performance and all the records will be returned as result in the search option of the Filter dialog.  

You can increase the Excel filter choice count by modifying the filterChoiceCount argument value in the actionBegin event when the requestType is ‘filterchoicerequest’ as demonstrated in the below code snippet, 
 
 
function actionBegin(args){ 
  if(args.requestType == 'filterchoicerequest' || args.requestType === "filtersearchbegin"){ 
  
 args.filterChoiceCount = 5000;   // change the filterchoicecount value as you need (the filter check list shown based on this value ) 
 } 
} 
 
 
 
Find the below documentation for your reference. 
 
 
Please get back to us if you need further assistance with this. 
 
Regards, 
Rajapandiyan S 


Loader.
Up arrow icon