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

Filter exception

0 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dick
Top achievements
Rank 1
Dick asked on 30 Nov 2011, 02:54 PM
I use a FilterTemplate (RadCombobox) in a RadGrid.
<EventOn:EventManagerGridTemplateColumn DataField="StatusType" UniqueName="StatusType" InterfaceMessageType="EventManagerGridHeaderStatusType" SortExpression="StatusType">
    <HeaderStyle Width="70px" />
    <FilterTemplate>
      <EventOn:EventManagerTypeFilterDropDown ID="ddStatusType" runat="server" EnumType="StatusType" CssClass="FormDropDown" Width="70px"
        DataValueField="StatusType" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("StatusType").CurrentFilterValue %>'
        OnClientSelectedIndexChanged="StatusTypeIndexChanged"/>
 
        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
 
            <script type="text/javascript">
                function StatusTypeIndexChanged(sender, args) {
                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                    tableView.filter("StatusType", args.get_item().get_value(), "EqualTo");
                }
            </script>
 
        </telerik:RadScriptBlock>
    </FilterTemplate>
    <ItemStyle Width="50px" HorizontalAlign="Left" VerticalAlign="Top"></ItemStyle>
    <ItemTemplate>                           
         <EventOn:EventManagerTypeIcon ID="EventOnTypeIcon3" runat="server" Value='<%# Eval("StatusType")%>'></EventOn:EventManagerTypeIcon>
    </ItemTemplate>
</EventOn:EventManagerGridTemplateColumn>

I receive the following exception when filtering the column.
Runtime-fout Microsoft JScript: Sys.WebForms.PageRequestManagerServerErrorException: Neither of the types 'String' and 'StatusType' converts to the other

What am i doing wrong?

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Dick
Top achievements
Rank 1
Share this question
or