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

Reducing the filter menu options is not working in list view with rad filter control

7 Answers 85 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Prassin
Top achievements
Rank 1
Prassin asked on 09 Aug 2012, 09:31 AM
Hi all,
I have a rad list view and a rad filter ... i need to reduce the menu option containing rad filter . so i have use the below java script and code.
Script
<script type="text/javascript">
          function FilterCreated(sender, eventArgs) {
              var filterMenu = sender.get_contextMenu();
              filterMenu.add_showing(FilterMenuShowing);
          }
          function FilterMenuShowing(sender, eventArgs) {
              var filter = $find("<%= RadFilter2.ClientID %>");
              var currentExpandedItem = sender.get_attributes()._data.ItemHierarchyIndex;
              sender.findItemByValue("Between").set_visible(false);
              sender.findItemByValue("DoesNotContain").set_visible(false);
              sender.findItemByValue("EndsWith").set_visible(false);
              sender.findItemByValue("GreaterThan").set_visible(false);
              sender.findItemByValue("GreaterThanOrEqualTo").set_visible(false);
              sender.findItemByValue("IsEmpty").set_visible(false);
              sender.findItemByValue("IsNull").set_visible(false);
              sender.findItemByValue("LessThan").set_visible(false);
              sender.findItemByValue("LessThanOrEqualTo").set_visible(false);
              sender.findItemByValue("NotBetween").set_visible(false);
              sender.findItemByValue("NotEqualTo").set_visible(false);
              sender.findItemByValue("NotIsEmpty").set_visible(false);
              sender.findItemByValue("NotIsNull").set_visible(false);
              sender.findItemByValue("And").set_visible(false);
              sender.findItemByValue("NotAnd").set_visible(false);
              sender.findItemByValue("NotOr").set_visible(false);
              sender.findItemByValue("Or").set_visible(false);
              }
          }
      </script>

Aspx
<telerik:RadFilter runat="server" ID="RadFilter2" FilterContainerID="RadListView1"
   ClientSettings-ClientEvents-OnFilterCreated="FilterCreated"
      ExpressionPreviewPosition="Bottom">
   <FieldEditors>
      <telerik:RadFilterTextFieldEditor FieldName="ItemName" DisplayName="ItemName" DataType="System.String" />
              <telerik:RadFilterTextFieldEditor FieldName="ItemCode" DisplayName="ItemCode" DataType="System.String" />
  </FieldEditors>
 </telerik:RadFilter>

Rad Ajax Update:
<telerik:AjaxSetting AjaxControlID="RadFilter2">
  <UpdatedControls>
     <telerik:AjaxUpdatedControl ControlID="RadListView1" LoadingPanelID="RadAjaxLoadingPanel1" />
      <telerik:AjaxUpdatedControl ControlID="RadFilter2" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
 </telerik:AjaxSetting>


Code
Protected Sub RadFilter2_AppyExpressions(ByVal sender As Object, ByVal e As RadFilterApplyExpressionsEventArgs)
       Dim provider As New RadFilterListViewQueryProvider(New List(Of RadFilterGroupOperation)())
       provider.ProcessGroup(e.ExpressionRoot)
       RadListView1.FilterExpressions.Add(provider.ListViewExpressions(0))
       RadListView1.Rebind()
   End Sub

 when i try to select the menu of the filter control that time am getting the error like "Microsoft JScript runtime error: Unable to get value of the property 'set_visible': object is null or undefined"

Please fix my issue... 

Regards,

Prassin

7 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 13 Aug 2012, 02:18 PM
Hi,

I suggest that you examine the project which I have attached in the forum thread below and let me know if it works for you or you need additional assistance.
http://www.telerik.com/community/forums/aspnet-ajax/filter/hide-certain-flter-menu-options-in-radfilter.aspx

Greetings,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Prassin
Top achievements
Rank 1
answered on 14 Aug 2012, 05:40 AM
Hi Pavlina,

I have followed that forum link apply the code like that.. but it showing the same error like "Microsoft JScript runtime error: Unable to get value of the property 'set_visible': object is null or undefined" please have looked up the above mentioned codes and clarify if there any error's on my code..

Thanks & Regards,

Prassin
0
Pavlina
Telerik team
answered on 15 Aug 2012, 04:13 PM
Hi Prassin,

Can you specify which version of RadControls for ASP.NET AJAX you are using? If you are not using the latest version, please download it and see if the problem still persists.

Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Prassin
Top achievements
Rank 1
answered on 16 Aug 2012, 05:01 AM
Hi Pavlina,

I am using asp ajax Q2 2012 version (second last released version).. my project i wish to stay this version.. and are you sure about my problem resolve after downloading new version.. 

Regards,

Prassin
0
Pavlina
Telerik team
answered on 20 Aug 2012, 01:29 PM
Hi,

Can you prepare a sample runnable project and send it to us via formal support ticket, so we can replicate the described problem locally. We will debug it locally and will get back to you with additional information. You can follow the instructions from this blog post to isolate the issue.

Greetings,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Prassin
Top achievements
Rank 1
answered on 21 Aug 2012, 06:49 AM
Hi Pavlina

here i am too busy with my work ... so i il attach the code behind and source here.. i think you can easily understand this.. please corporate with me and help to achieve my goal..
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="ItemSearch.aspx.vb" Inherits="Presentation_Layer_ItemSearch" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="styles/ItemMasterStyles.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .divContainer1
        {
            background: url('main_back.png') no-repeat;
            width: 100%;
            height: 500px;
            position: relative;
        }
    </style>
 
    <script src="~/jquery-1.4.2.min.js" type="text/javascript"></script>
 
    <style type="text/css">
        .imgThNail
        {
            height: 150px;
            width: 150px;
        }
    </style>
    <%--<script type="text/javascript">
       function FilterCreated(sender, eventArgs) {
           var filterMenu = sender.get_contextMenu();
           filterMenu.add_showing(FilterMenuShowing);
       }
       function FilterMenuShowing(sender, eventArgs) {
           var filter = $find("<%= RadFilter2.ClientID %>");
           var currentExpandedItem = sender.get_attributes()._data.ItemHierarchyIndex;
           // if (filter._expressionItems[currentExpandedItem] == "Father") {
           // sender.findItemByValue("IsNull").set_visible(false);
           // sender.findItemByValue("NotIsNull").set_visible(false);
           // }
           //                if (filter._expressionItems[currentExpandedItem] == "SubCatName")
           //                 {
           sender.findItemByValue("Between").set_visible(false);
           sender.findItemByValue("DoesNotContain").set_visible(false);
           sender.findItemByValue("EndsWith").set_visible(false);
           sender.findItemByValue("GreaterThan").set_visible(false);
           sender.findItemByValue("GreaterThanOrEqualTo").set_visible(false);
           sender.findItemByValue("IsEmpty").set_visible(false);
           sender.findItemByValue("IsNull").set_visible(false);
           sender.findItemByValue("LessThan").set_visible(false);
           sender.findItemByValue("LessThanOrEqualTo").set_visible(false);
           sender.findItemByValue("NotBetween").set_visible(false);
           sender.findItemByValue("NotEqualTo").set_visible(false);
           sender.findItemByValue("NotIsEmpty").set_visible(false);
           sender.findItemByValue("NotIsNull").set_visible(false);
           sender.findItemByValue("And").set_visible(false);
           sender.findItemByValue("NotAnd").set_visible(false);
           sender.findItemByValue("NotOr").set_visible(false);
           sender.findItemByValue("Or").set_visible(false);
 
           //                }
       }
        </script>--%>
 
    <script type="text/javascript">
        function filterCreated(sender, args) {
            sender.get_contextMenu().add_showing(
            function(sender, args) {
                
                sender.findItemByValue("Between").set_visible(false);
                sender.findItemByValue("DoesNotContain").set_visible(false);
                sender.findItemByValue("EndsWith").set_visible(false);
                sender.findItemByValue("GreaterThan").set_visible(false);
                sender.findItemByValue("GreaterThanOrEqualTo").set_visible(false);
                sender.findItemByValue("IsEmpty").set_visible(false);
                sender.findItemByValue("IsNull").set_visible(false);
                sender.findItemByValue("LessThan").set_visible(false);
                sender.findItemByValue("LessThanOrEqualTo").set_visible(false);
                sender.findItemByValue("NotBetween").set_visible(false);
                sender.findItemByValue("NotEqualTo").set_visible(false);
                sender.findItemByValue("NotIsEmpty").set_visible(false);
                sender.findItemByValue("NotIsNull").set_visible(false);
                sender.findItemByValue("And").set_visible(false);
                sender.findItemByValue("NotAnd").set_visible(false);
                sender.findItemByValue("NotOr").set_visible(false);
                sender.findItemByValue("Or").set_visible(false);
            }
      );
        }
    </script>
 
    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
 
        <script type="text/javascript">
            var uploadedFilesCount = 0;
            var isEditMode;
            function validateRadUpload(source, e) {
 
                if (isEditMode == null || isEditMode == undefined) {
                    e.IsValid = false;
 
                    if (uploadedFilesCount > 0) {
                        e.IsValid = true;
                    }
                }
                isEditMode = null;
            }
 
            function OnClientFileUploaded(sender, eventArgs) {
                uploadedFilesCount++;
            }
            function onNodeClick(sender, args) {
                var node = args.get_node();
                if (node.get_category() == "Product") {
                    var childNodes = node.get_nodes();
                    for (var i = 0; i < childNodes.get_count(); i++) {
                        var childNode = childNodes.getNode(i);
                        childNode.select();
                    }
                }
            }
            
             
        </script>
 
        <script type="text/javascript">
 
            function openRadWindow(ItemId) {
                var oWnd = radopen("DialogVB2.aspx?ItemId=" + ItemId, "RadWindow1");
                oWnd.center();
            }
        </script>
 
        <style type="text/css">
            .details
            {
                width: 100%;
                height: 90%;
            }
            .details ul
            {
                list-style-image: none;
                list-style-type: none;
                margin: 0;
                padding: 10px;
            }
            .details ul label
            {
                font-weight: bold;
            }
            .photo-container
            {
                padding: 10px;
                width: 150px;
                float: right;
            }
            .data-container
            {
                height: 90%;
                width: auto;
            }
        </style>
    </telerik:RadCodeBlock>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="divContainer1">
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        <telerik:AjaxUpdatedControl ControlID="DetailsView1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadBinaryImage2" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadTreeView2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        <telerik:AjaxUpdatedControl ControlID="RadTreeView2" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadBinaryImage2" />
                        <telerik:AjaxUpdatedControl ControlID="RadListView1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="AnchorButton">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                        <telerik:AjaxUpdatedControl ControlID="RadBinaryImage2" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="btnSearch">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadListView1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="txtName" />
                        <telerik:AjaxUpdatedControl ControlID="fieldCombo" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadFilter2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadListView1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadFilter2" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
        </telerik:RadAjaxLoadingPanel>
        <table style="width: 990px">
            <legend style="border: 1px groove #000000; font-size: 16px; width: 99%; color: #808080;
                font-weight: bold;">Item Search </legend>
            <tr>
                <td valign="top">
                    <asp:Panel ID="Panel1" Width="325px" Height="260px" BorderWidth="1" runat="server">
                        <div id="Div1" style="float: none; width: 300px; height: 240px; margin-left: 2px;
                            margin-right: 20px;" runat="server">
                            <fieldset id="FieldSet1" style="width: 300px; height: 240px;">
                                <legend><b>Select category</b> </legend>
                                <telerik:RadTreeView runat="server" ID="RadTreeView2" DataSourceID="SqlDataSource4"
                                    DataTextField="SubCatName" DataFieldID="SubCatId" DataFieldParentID="MasterCategoryId"
                                    DataValueField="SubCatId" OnNodeClick="RadTreeView2_NodeClick" Height="260px"
                                    Width="300px" BorderWidth="0px">
                                    <DataBindings>
                                        <telerik:RadTreeNodeBinding Depth="0" Checkable="false" TextField="SubCatName" Expanded="false" />
                                    </DataBindings>
                                </telerik:RadTreeView>
                            </fieldset>
                        </div>
                    </asp:Panel>
                </td>
                <td valign="top" rowspan="2">
                    <asp:Panel Width="700px" Height="460px" BorderWidth="1" runat="server" ScrollBars="Horizontal">
                        <telerik:RadListView ID="RadListView1" runat="server" DataSourceID="SqlDataSource1"
                            DataKeyNames="ItemId" ItemPlaceholderID="ListViewContainer" Width="700px" Height="460px"
                            BorderWidth="1">
                            <LayoutTemplate>
                                <asp:PlaceHolder runat="server" ID="ListViewContainer" />
                            </LayoutTemplate>
                            <ItemTemplate>
                                <fieldset style="float: left; width: 205px; height: 160px;">
                                    <legend><b>Item Name</b>:
                                        <%#Eval("ItemName")%></legend>
                                    <div class="details">
                                        <label>
                                            Code:</label>
                                        <%#Eval("ItemCode")%>
                                        <asp:LinkButton ID="lnkRegister" runat="server" ToolTip="Click here to go to asset registration page"
                                            CommandName="Register">Asset registration</asp:LinkButton>
                                        <div class="photo-container">
                                            <telerik:RadBinaryImage runat="server" ID="RadBinaryImage5" DataValue='<%#Eval("ItemPhotoSmall") %>'
                                                AutoAdjustImageControlSize="false" Width="160px" Height="120px" ToolTip='<%#Eval("ItemName", "Photo of {0}") %>'
                                                AlternateText='<%#Eval("ItemName", "Photo of {0}") %>' />
                                        </div>
                                        <div class="data-container">
                                            <ul>
                                                
                                            </ul>
                                        </div>
                                    </div>
                                </fieldset>
                            </ItemTemplate>
                        </telerik:RadListView>
                    </asp:Panel>
                    <%--   </div>--%>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AMSysConnectionString %>"
                        SelectCommand="prcSelect_ItemMasterGrid" SelectCommandType="StoredProcedure"
                        DeleteCommand="prcDelete_ItemMaster" DeleteCommandType="StoredProcedure">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="RadTreeView2" DefaultValue="0" Name="ItemId" PropertyName="SelectedValue"
                                Type="Int64" />
                            <asp:ControlParameter ControlID="RadTreeView2" DefaultValue="" Name="mode" PropertyName="SelectedNode.Level"
                                Type="Byte" />
                        </SelectParameters>
                        <DeleteParameters>
                            <asp:Parameter Name="ItemId" Type="Int64" />
                            <asp:Parameter DefaultValue="5" Name="mode" Type="Byte" />
                        </DeleteParameters>
                    </asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    <asp:Panel ID="Panel2" Width="325px" Height="187px" BorderWidth="1" runat="server">
                        <div id="Div4" style="float: none; width: 300px; height: 165px; margin-left: 2px;
                            margin-right: 20px;" runat="server">
                            <fieldset id="FieldSet5" style="width: 300px; height: 165px; float: none;">
                                <legend><b>Filter data</b> </legend>
                                <table>
                                    <tr>
                                        <td>
                                            <%--
                                            "--%>
                                            <telerik:RadFilter runat="server" ID="RadFilter2" FilterContainerID="RadListView1"
                                           ClientSettings-ClientEvents-OnFilterCreated="FilterCreated"
                                                ExpressionPreviewPosition="Bottom">
                                                <FieldEditors>
                                                    <telerik:RadFilterTextFieldEditor FieldName="ItemName" DisplayName="ItemName" DataType="System.String" />
                                                    <telerik:RadFilterTextFieldEditor FieldName="ItemCode" DisplayName="ItemCode" DataType="System.String" />
                                                </FieldEditors>
                                                <ClientSettings>
                                                    <ClientEvents OnFilterCreated="filterCreated" />
                                                </ClientSettings>
                                            </telerik:RadFilter>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <%--<telerik:RadTextBox ID="txtName" runat="server" Width="250px" />--%>
                                        </td>
                                    </tr>
                                    <tr align="left">
                                        <td>
                                            <%--<telerik:RadButton ID="btnSearch" runat="server" Text="Search" ButtonType="StandardButton">
                                            </telerik:RadButton>--%>
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </div>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td valign="top">
                      
                </td>
                <td valign="top">
                    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All"
                        EnableRoundedCorners="false" ControlsToSkip="GridFormDetailsViews, Zone" />
                    <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:AMSysConnectionString %>"
                        SelectCommand="prcSelect_SubCategory" SelectCommandType="StoredProcedure">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="0" Name="SubCatId" Type="Byte" />
                            <asp:Parameter DefaultValue="5" Name="mode" Type="Byte" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td>
                      
                </td>
                <td>
                      
                </td>
            </tr>
        </table>
        <telerik:RadWindowManager ShowContentDuringLoad="false" AutoSize="true" EnableShadow="true"
            Skin="Black" ID="RadWindowManager1" Width="900px" Height="200px" runat="server">
        </telerik:RadWindowManager>
    </div>
</asp:Content>


Imports Telerik.Web.UI
Imports System.Linq
Imports System
Imports System.Data.SqlClient
Imports System.Data
Imports System.Configuration
Imports System.Collections.Generic
Imports System.IO
Imports System.IO.Stream
Imports FreeImageAPI.FreeImage
Imports System.Drawing
Imports System.Drawing.Drawing2D
Partial Class Presentation_Layer_ItemSearch
    Inherits System.Web.UI.Page
   
    Const MaxTotalBytes As Integer = 1048576 ' 1 MB
    Dim totalBytes As Integer
    Public SqlDA As New SqlDataAdapter
    Public DT As New DataTable
    Public CMD As New SqlCommand
    Public con As New SqlConnection
    Public Tran As SqlTransaction
    Public DS As New DataSet
 
    
    Public Property IsRadAsyncValid() As System.Nullable(Of Boolean)
        Get
            If Session("IsRadAsyncValid") Is Nothing Then
                Session("IsRadAsyncValid") = True
            End If
 
            Return Convert.ToBoolean(Session("IsRadAsyncValid").ToString())
        End Get
        Set(ByVal value As System.Nullable(Of Boolean))
            Session("IsRadAsyncValid") = value
        End Set
    End Property
    Public Shared ReadOnly Property ConnectionString() As String
        Get
            Return ConfigurationManager.ConnectionStrings("AMSysConnectionString2").ConnectionString
        End Get
    End Property
 
    Protected Overrides Sub OnLoad(ByVal e As EventArgs)
        MyBase.OnLoad(e)
 
        IsRadAsyncValid = Nothing
    End Sub
    Public Sub connect()
        If con.State = ConnectionState.Open Then
            con.Close()
        End If
        Dim connetionString As String = ConfigurationManager.ConnectionStrings("AMSysConnectionString").ConnectionString
        con = New SqlConnection(connetionString)
    End Sub
 
    Public Sub RadAsyncUpload1_ValidatingFile(ByVal sender As Object, ByVal e As Telerik.Web.UI.Upload.ValidateFileEventArgs)
        If (totalBytes < MaxTotalBytes) AndAlso (e.UploadedFile.ContentLength < MaxTotalBytes) Then
            e.IsValid = True
            totalBytes += e.UploadedFile.ContentLength
            IsRadAsyncValid = True
        Else
            e.IsValid = False
            IsRadAsyncValid = False
        End If
    End Sub
 
    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As EventArgs)
        
    End Sub
   
    Private Property ProcessedNodes() As List(Of RadTreeNode)
        Get
            Return Session("ProcessedNodes")
        End Get
        Set(ByVal value As List(Of RadTreeNode))
            Session("ProcessedNodes") = value
        End Set
    End Property
 
    Protected Sub RadTreeView2_NodeClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs)
        Session("CatID") = e.Node.Value
    End Sub
     
    Sub HtmlAnchor_Click(ByVal sender As Object, ByVal e As EventArgs)
    End Sub
 
    Public Function GetDataTable(ByVal query As String) As DataTable
        Dim ConnString As String = ConfigurationManager.ConnectionStrings("AMSysConnectionString2").ConnectionString
        Dim conn As SqlConnection = New SqlConnection(ConnString)
        Dim adapter As SqlDataAdapter = New SqlDataAdapter
        adapter.SelectCommand = New SqlCommand(query, conn)
        Dim table1 As New DataTable
        conn.Open()
        Try
            adapter.Fill(table1)
        Finally
            conn.Close()
        End Try
        Return table1
    End Function
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Session("mode") = 3
        End If
 
    End Sub
 
     
    Protected Sub RadTreeView2_NodeClick1(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView2.NodeClick
    End Sub
 
    Protected Sub RadListView1_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadListViewCommandEventArgs) Handles RadListView1.ItemCommand
        If e.CommandName = "Register" Then
            Dim item As RadListViewDataItem = TryCast(e.ListViewItem, RadListViewDataItem)
            Dim myValue As String = item.GetDataKeyValue("ItemId").ToString()
            Session("ItemId") = myValue
            Response.Redirect("AssetRegisterNew.aspx")
 
        End If
    End Sub
   
    Protected Sub RadFilter2_AppyExpressions(ByVal sender As Object, ByVal e As RadFilterApplyExpressionsEventArgs)
        Dim provider As New RadFilterListViewQueryProvider(New List(Of RadFilterGroupOperation)())
        provider.ProcessGroup(e.ExpressionRoot)
        RadListView1.FilterExpressions.Add(provider.ListViewExpressions(0))
        RadListView1.Rebind()
    End Sub
 
 
End Class

Please do the needful

Regards
Prassin
0
Pavlina
Telerik team
answered on 24 Aug 2012, 02:13 PM
Hi,

Attached to this message is a sample runnable project which handles the desired functionality and is working without problems. Check it out and see what is the difference in your case and what you need to change in order to resolve the problem you are facing.


Greetings,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ListView
Asked by
Prassin
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Prassin
Top achievements
Rank 1
Share this question
or