2014.2.909.45
Can you tell me what is the correct syntax for these two usages:
Clear the column's filter: - not working as expected when passing blank in the 2nd parameter.
tableview.filter("profile", '', "NoFilter");
Setting the filter to IsNull - not working as expected when passing blank in the 2nd parameter.
tableView.filter("profile", '' , "IsNull");
<telerik:GridTemplateColumn HeaderText="Profile" HeaderStyle-Width="200px" UniqueName="sf_profile" DataField="profile" DataType="System.String">
<ItemTemplate>
<%# Eval("profile") %>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadDropDownList runat="server" ID="ProfileIdropDown" DataValueField="lov_profile" DataTextField="lov_profile" Width="200px"
DataSourceID="srcProfile">
</telerik:RadDropDownList>
</EditItemTemplate>
<FilterTemplate>
<telerik:RadComboBox runat="server" ID="cboProfileFilter" DataSourceID="srcProfile" AppendDataBoundItems="true" Width="200px"
DataValueField="lov_profile" DataTextField="lov_profile"
SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("profile").CurrentFilterValue %>'
OnClientSelectedIndexChanged="ProfileIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="All" />
<telerik:RadComboBoxItem Text="[Blank]" Value="" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID="RadScriptBlockProfile" runat="server">
<script type="text/javascript">
function ProfileIndexChanged(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
if (args.get_item().get_value() == 'All') {
tableview.filter("profile", '', "NoFilter");
} else if (args.get_item().get_value() == '') {
tableView.filter("profile", '' , "IsNull");
} else {
tableView.filter("profile", args.get_item().get_value(), "EqualTo");
}
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridTemplateColumn>
Can you tell me what is the correct syntax for these two usages:
Clear the column's filter: - not working as expected when passing blank in the 2nd parameter.
tableview.filter("profile", '', "NoFilter");
Setting the filter to IsNull - not working as expected when passing blank in the 2nd parameter.
tableView.filter("profile", '' , "IsNull");
<telerik:GridTemplateColumn HeaderText="Profile" HeaderStyle-Width="200px" UniqueName="sf_profile" DataField="profile" DataType="System.String">
<ItemTemplate>
<%# Eval("profile") %>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadDropDownList runat="server" ID="ProfileIdropDown" DataValueField="lov_profile" DataTextField="lov_profile" Width="200px"
DataSourceID="srcProfile">
</telerik:RadDropDownList>
</EditItemTemplate>
<FilterTemplate>
<telerik:RadComboBox runat="server" ID="cboProfileFilter" DataSourceID="srcProfile" AppendDataBoundItems="true" Width="200px"
DataValueField="lov_profile" DataTextField="lov_profile"
SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("profile").CurrentFilterValue %>'
OnClientSelectedIndexChanged="ProfileIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="All" />
<telerik:RadComboBoxItem Text="[Blank]" Value="" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID="RadScriptBlockProfile" runat="server">
<script type="text/javascript">
function ProfileIndexChanged(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
if (args.get_item().get_value() == 'All') {
tableview.filter("profile", '', "NoFilter");
} else if (args.get_item().get_value() == '') {
tableView.filter("profile", '' , "IsNull");
} else {
tableView.filter("profile", args.get_item().get_value(), "EqualTo");
}
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridTemplateColumn>