I am having considerable issues with the Grid Filter functionality, there are a couple of problems.
With the grid setup as below:
with these 2 fields:
<e-grid-column field="ClientContactId"
headerText="Client"
dataSource="clients"
foreignKeyField="Id"
foreignKeyValue="Text">
</e-grid-column>
<e-grid-column field="PersonnelKey"
headerText="Creator"
dataSource="employees"
foreignKeyField="Id"
foreignKeyValue="Text">
</e-grid-column>
Problem:
With these two fields, the second field attempts to filter using the field name of the first, so the second of these columns PersonnelKey will send a ajax query to the server for filtered data but it uses the wrong field name ClientContactId instead of PersonnelKey
e.g. https://localhost:5001/odata/invoiceheaders/?$count=true&$filter=((ClientContactId%20eq%2072))&$skip=0&$top=20
Sometimes the second field column refuses to send any ajax query at all to filter the table.
But oddly if the fields are swapped in source code or at run time with column reordering the behavior changes, then the 1st column filters properly but the second column filters with the other columns field. The second column has the issue, irrespective of which column it is.
i.e.
If ClientContactID is the first field, the PersonnelKey field has the problem,
If PersonnelKey is the first field, the ClientContactID field has the problem,
and the problem doesn't care if the order is changed via xaml source or by run time reordering.
I have attached the controller, the view, and the lookup object that is being used by ViewBag
-----------------------------------------------------------------
<ejs-grid id="Grid"
allowExcelExport="true"
allowPdfExport="true"
allowResizing="true"
allowReordering="true"
allowGrouping="true"
allowSorting="true"
allowFiltering="true"
allowPaging="true"
enableAltRow="true"
showColumnMenu="true"
allowTextWrap="true"
actionBegin="actionBegin"
actionComplete="actionComplete"
dataBound="dataBound"
load="load"
toolbarClick="toolbarClick"
toolbar="@(new List<string>() {"Add", "Edit", "Delete", "Cancel", "Update", "ExcelExport", "PdfExport" })">
<e-grid-groupsettings showGroupedColumn="true"></e-grid-groupsettings>
<e-grid-pagesettings pageCount="5" pageSize="20" pageSizes="@(new string[] { "10", "20" , "100" })"></e-grid-pagesettings>
<e-grid-editsettings mode="Dialog"
allowAdding="true"
allowEditing="true"
allowDeleting="true"
template="#editDialogTemplate"
showDeleteConfirmDialog="true"
showConfirmDialog="true">
</e-grid-editsettings>
<e-data-manager url="@odataUrl" adaptor="ODataV4Adaptor"></e-data-manager>
<e-grid-columns>
<e-grid-column field="InvoiceHeaderId"
isIdentity="true"
isPrimaryKey="true"
visible="false">
</e-grid-column>
<e-grid-column field="InvoiceNumber"
headerText="Invoice #"
minWidth="100"
template="#invoiceLink">
</e-grid-column>
<e-grid-column field="CreationDate"
headerText="Date Created"
visible="false">
</e-grid-column>
<e-grid-column field="ClientContactId"
headerText="Client"
dataSource="clients"
foreignKeyField="Id"
foreignKeyValue="Text">
</e-grid-column>
<e-grid-column field="PersonnelKey"
headerText="Creator"
dataSource="employees"
foreignKeyField="Id"
foreignKeyValue="Text">
</e-grid-column>
<e-grid-column field="Status"
headerText="Status">
</e-grid-column>
<e-grid-column field="ClientReference"
headerText="Client Reference"
visible="false">
</e-grid-column>
<e-grid-column field="SubmissionDate"
headerText="Date Submitted"
visible="false">
</e-grid-column>
<e-grid-column field="ClientMemo"
headerText="Extended Client Ref"
visible="false">
</e-grid-column>
<e-grid-column field="Memo"
headerText="Note to Client"
visible="false">
</e-grid-column>
<e-grid-column field="PrivateMemo"
headerText="Note to Acct"
visible="false">
</e-grid-column>
<e-grid-column field="AdditionalEmail"
headerText="Additional Emails"
visible="false">
</e-grid-column>
<e-grid-column field="InvoiceDate"
headerText="Date Invoiced">
</e-grid-column>
</e-grid-columns>
</ejs-grid>
Attachment:
Source_f1be0c1d.zip