Telerik rad list view hide items using jquery

2 posts, 0 answers
  1. Rasangika
    Rasangika avatar
    1 posts
    Member since:
    Aug 2016

    Posted 29 Aug Link to this post

    I need to hide list view items depend on the values in item.

     

      <telerik:RadListView ID="lvCustomers" Width="97%" runat="server" ItemPlaceholderID="ProductsHolder"
                    allowsorting="true" DataKeyNames="Guid">
                    <LayoutTemplate>
                        <fieldset style="max-width: 1100px" id="FieldSet1">
                            <asp:Panel ID="ProductsHolder" runat="server">
                            </asp:Panel>
                            <telerik:RadDataPager RenderMode="Lightweight" ID="dpCustomers" runat="server">
                                <Fields>
                                    <telerik:RadDataPagerTemplatePageField>
                                        <PagerTemplate>
                                            <asp:Label ID="lblTotalRecordCount" runat="server" Text="<%# TotalCustomerText %>"></asp:Label>
                                            <asp:Label ID="labTotalCustomerCountValue" runat="server" Text="<%# TotalCustomerValue %>"></asp:Label>
                                        </PagerTemplate>
                                    </telerik:RadDataPagerTemplatePageField>
                                </Fields>
                            </telerik:RadDataPager>
                        </fieldset>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <div class="hubCustomer" id="divCustomer" runat="server">
                            <asp:HiddenField Id="hfIsMyCustomer" runat="server" />
                            <div class="row">
                                <div class="col-md-5 nopadding hubCustomerCode">
    <asp:Label ID="lblCustomerCode" runat="server"></asp:Label>  
                                </div>
                                <div class="col-md-4 nopadding text-right">Budget</div>

                                <div class="col-md-3 nopadding text-left">
                                    <div class="circleSuccess" id="divBudgetPerformance" runat="server"></div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-md-12 nopadding">
                                    <asp:Label ID="lblCustomerName" runat="server"></asp:Label>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12 CustomerListProgress">
                                    <uc1:ProgressBar ID="pbCustomerProgress" runat="server" Editable="false" />
                                </div>
                            </div>
    </div>
                    </ItemTemplate>
                </telerik:RadListView>


            function HideCustomers() {
                debugger;
                var list = $find('<%= lvCustomers.ClientID %>'); // the List view customer data hold
                var items = list.get_items(); // this method not working

                for (var i = 0; i < items.get_count() ; i++) {  //loop through item

                    //need to do
    Get value of hfIsMyCustomer
    If value is false , hide entire item

                }
            };

  2. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 01 Sep Link to this post

    Hello Rasangika,

    I suggest that you examine the web site provided in the following resource since RadDataForm is very similar to RadListView:
    http://www.telerik.com/support/code-library/accessing-controls-in-dataform

    I hope this will prove helpful.

    Regards,
    Eyup
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top