This is a migrated thread and some comments may be shown as answers.

Problem with filtering double and single quotes

1 Answer 117 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kenneth
Top achievements
Rank 1
Kenneth asked on 07 Jul 2017, 03:17 PM

I've implemented dropdown filters and have a problem filtering items that have single or double quotes.

<FilterTemplate>
<telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBoxArea" DataSourceID="SqlDataSource9" DataTextField="area"
DataValueField="area" Width="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("area").CurrentFilterValue %>'
runat="server" OnClientSelectedIndexChanged="AreaChanged">
<Items>
<telerik:RadComboBoxItem Text="All" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID="RadScriptBlockArea" runat="server">
<script type="text/javascript">
function AreaChanged(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter("area", args.get_item().get_value(), "EqualTo");
alert(args.get_item().get_value());
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>

The problem seems to be in the statement: tableView.filter("area", args.get_item().get_value(), "EqualTo");

I can see the value from args.get_item().get_value() and it looks fine, the single and double quotes are there (see alert I put in to view the value).

Any suggestions or work arounds? Is this a problem with the Grid?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 12 Jul 2017, 05:30 AM
Hello Kenneth,

I've already replied to your ticket with ID: 1118516. I suggest that we continue our technical conversation on the mentioned thread.

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Kenneth
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or