Hello support,
This error occurs only while browsing through outlook and cannot be reproduced on IE, chrome or firefox.
aspx:
<ej:DataManager ID="MetadocsData" runat="server" Adaptor="JsonAdaptor" Offline="true" EnableCaching="true" />
<ej:Grid ID="MetadocsGrid" runat="server" DataManagerID="MetadocsData" AllowPaging="True" AllowSorting="true" AllowMultiSorting="true" AllowSearching="true" AllowScrolling="false"
AllowFiltering="True" AllowResizeToFit="False" MinWidth="600" Locale="el-GR" GridLines="Horizontal" AllowResizing="true" AllowReordering="true" EnableResponsiveRow="true" IsResponsive="true" AllowCellMerging="true">
<ClientSideEvents TemplateRefresh="templateRefresh" RecordClick="recordClickEvt" ContextOpen="contextOpenEvt" ActionComplete="onComplete" RecordDoubleClick="onDoubleClickLibraryEvt" Load="onLoadLibraryGrid" />
<FilterSettings FilterType="Menu" EnableCaseSensitivity="false" />
<ToolbarSettings ShowToolbar="true" ToolbarItems="search"></ToolbarSettings>
<SearchSettings Operator="Contains" IgnoreCase="true" />
<ContextMenuSettings EnableContextMenu="true"></ContextMenuSettings>
<ScrollSettings Width="100%" Height="100%" />
<PageSettings PageSize="20" />
<ResizeSettings ResizeMode="Normal"></ResizeSettings>
</ej:Grid>
The grid columns and data are populated in the backend. Has 3 static columns, 2 hidden and the rest are coming from a service.
this.MetadocsGrid.Columns.Clear();
this.MetadocsGrid.Columns.Add(new Column() { Field = "Type", HeaderText = "Type", HeaderTooltip = "Type", DataType = "string", Width = "80px", CssClass = "gridHeaderTh", Template = "<div class='{{:Type}}' style='margin-left:10px;'></div>" });
this.MetadocsGrid.Columns.Add(new Column() { Field = "Title", HeaderText = "Title", HeaderTooltip = "The Title", DataType = "string", CssClass = "gridTitleColumn" });
foreach (DynamicColumns columnObj in libObj._libraryObj.DynColumns)
{
this.MetadocsGrid.Columns.Add(new Column() { Field = columnObj.Title, HeaderText = columnObj.Title, HeaderTooltip = columnObj.Title, DataType = GetSyncfusionColumnType(columnObj.Type, columnObj.Title), DisableHtmlEncode = true, CssClass = "gridHeaderTh" });
}
this.MetadocsGrid.Columns.Add(new Column() { Field = "Size", HeaderText = "Size", HeaderTooltip = "Size", DataType = "string", AllowTextWrap = false, CssClass = "gridHeaderTh", Width = "100px" });
this.MetadocsGrid.Columns.Add(new Column() { Field = "Att", HeaderText = "Att", DataType = "boolean", Visible = false });
this.MetadocsGrid.Columns.Add(new Column() { Field = "Id", HeaderText = "Id", DataType = "number", Visible = false });
Then i am creating a DataTable obj, creating columns with the same name, adding rows with the data and lastly binding to the ej:DataManager.
this.MetadocsData.Json = datatable;
this.MetadocsGrid.DataBind();
I noticed that i can filter the static columns without error. Can also filter the dynamic column named 'To' but no other(maybe cannot handle the spaces?).
I also tried a few polyfils to no avail.
The solution provided worked.
In my solution i replace all whitespaces and illegal chars with an empty string using the below:
string pattern = "[\\~#%&*{}/:<>?|\"-()']";
Regex regEx = new Regex(pattern);
Regex.Replace(regEx.Replace(columnName, ""), @"\s+", "");
Thank you!