Hello,
I have a grid that loads the data through a web-service. This is my code:
Grid:
Web-service:
JavaScript filter function:
The problem is that the filters are case sensitive. I tried setting the case sensitive option in groupsettings in the grid, but that has no effect. Does anyone have a solution?
Thanks in advance!
I have a grid that loads the data through a web-service. This is my code:
Grid:
<telerik:RadGrid runat="server" ID="rgOverzicht" Width="690px" PageSize="10" AllowPaging="true" AllowSorting="false" ClientSettings-Scrolling-AllowScroll="false" ClientSettings-Scrolling-UseStaticHeaders="true" AllowFilteringByColumn="false" AllowMultiRowSelection="false" EnableLinqExpressions="false"> <GroupingSettings CaseSensitive="false" /> <MasterTableView NoMasterRecordsText="Geen artikelen om te tonen." DataKeyNames="Artikel_Id" ClientDataKeyNames="Artikel_Id" TableLayout="Fixed"> <PagerStyle Mode="NextPrevAndNumeric" PagerTextFormat="<b>{4}</b> Pagina <b>{0}</b> van <b>{1}</b> | Item <b>{2}</b> t/m <b>{3}</b> van de <b>{5}</b>. " ShowPagerText="True" /> <Columns> <telerik:GridBoundColumn DataField="IndexNr" UniqueName="IndexNr" HeaderText="Index" HeaderStyle-Width="65px" /> <telerik:GridBoundColumn DataField="Omschrijving" UniqueName="Omschrijving" HeaderText="Omschrijving" /> <telerik:GridBoundColumn DataField="Afmeting" UniqueName="Afmeting" HeaderText="Afmeting" HeaderStyle-Width="65px" /> <telerik:GridBoundColumn DataField="Drukklasse" UniqueName="Drukklasse" HeaderText="Drukklasse" HeaderStyle-Width="65px" /> <telerik:GridBoundColumn DataField="Eenheidstarief" UniqueName="Eenheidstarief" HeaderText="Prijs (in €)" HeaderStyle-Width="75px" /> </Columns> <PagerStyle Mode="NumericPages" /> </MasterTableView> <ClientSettings EnableRowHoverStyle="true"> <DataBinding SelectMethod="GetDataAndCount" Location="~/CalculatieGrid.asmx" SortParameterType="Linq" FilterParameterType="Linq" > </DataBinding> <Selecting AllowRowSelect="True" /> </ClientSettings> </telerik:RadGrid>Web-service:
var data = RadGrid.GetBindingData(source, startRowIndex, maximumRows, sortExpression, filterExpression);result.Data = data.Data.ToList();result.Count = data.Count;return result;JavaScript filter function:
<script type="text/javascript"> $("#Search").click(function (e) { if ($('#txtFilterOmschrijving').val() != "" && $('#txtFilterOmschrijving').val() != $('#txtFilterOmschrijving').attr("defaultValue")) { filterExpression = new Telerik.Web.UI.GridFilterExpression(); filterExpression.set_fieldName("Omschrijving"); filterExpression.set_columnUniqueName("Omschrijving"); filterExpression.set_dataTypeName("System.String"); filterExpression.set_filterFunction(Telerik.Web.UI.GridFilterFunction.Contains); ItemIdentifier = $('#txtFilterOmschrijving').val(); filterExpression.set_fieldValue(ItemIdentifier); vFilterExpressions.add(filterExpression); } tableView.rebind(); tableViewPlan.rebind(); }); </script>The problem is that the filters are case sensitive. I tried setting the case sensitive option in groupsettings in the grid, but that has no effect. Does anyone have a solution?
Thanks in advance!