Telerik RadListBox / Do Some Stuff In Hover & Select Of An Item Inside RadListBox …(Client Side)

4 posts, 1 answers
  1. Majid Darab
    Majid Darab avatar
    110 posts
    Member since:
    Sep 2012

    Posted 13 May 2011 Link to this post

    hi my dear friends :

    i am using RadListBox in my Project (asp.net with c# with vs2010)

    also i am using some link buttons in itemTemplate...

    i want to change the color of these LinkButtons when we hover or select an item in ListBox! (Client Side Programming)

    my RadListBox Is Like This :

                <telerik:RadListBox ID="RadlbOfImageGroup" runat="server" DataKeyField="ID" DataSortField="Title"
                    DataSourceID="sdsImagesGroup" DataTextField="Title" DataValueField="ID" Skin="BlackByMe"
                    EnableEmbeddedSkins="False" EmptyMessage="No Records!">
                    <ButtonSettings TransferButtons="All" />
                        <HeaderTemplate> <div id="Header_RadlbOfImageGroup"><h5>Header Area</h5></div>
    </HeaderTemplate>
     
                    <ItemTemplate>
                        <asp:LinkButton ID="lbTitleOfIG" CssClass="lbTitleOfIGclass" runat="server" CausesValidation="False"><%# Eval("Title") %></asp:LinkButton>
                        <asp:Label ID="lblTitleOfIG" CssClass="lblTitleOfIGclass" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                             
                        <asp:LinkButton ID="lbEditOfIG" CssClass="lbEditOfIGclass" runat="server" CausesValidation="False"
                            CommandName="Edit">Edit</asp:LinkButton>
                           
                        <asp:LinkButton ID="lbDeleteOfIG" CssClass="lbDeleteOfIGclass" runat="server" CausesValidation="False"
                            CommandName="Delete">Delete</asp:LinkButton>
                    </ItemTemplate>
                </telerik:RadListBox>

    i want to change the color of lbTitleOfIG during hover and select of an item !

    how can i do this job?

    thanks for attention

  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 13 May 2011 Link to this post

    Hello Majid,

    Try to apply the following CSS.
    CSS:
    <style type="text/css">
            .rlbTemplate a:hover
            {
                color: Yellow !important;
            }
    </style>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Majid Darab
    Majid Darab avatar
    110 posts
    Member since:
    Sep 2012

    Posted 13 May 2011 Link to this post

    dear friend(Princy) really thank you for answer (first problem solved) :
    i have a new problem.
    i set the AutoPostBack Property Of RadListBox To True Because Of SelectedIndexChanged Event (i Added Them After My Q)...
    Besides i Put That RadListBox Into An UpdatePanel , so when i click lbEditOfIG callback occurs and i lose that Yellow Color !
    How can i Fix This?
    In This Time It Seems We Should Set It By js... any idea?
  5. Majid Darab
    Majid Darab avatar
    110 posts
    Member since:
    Sep 2012

    Posted 13 May 2011 Link to this post

    mean is there a way to get controls inside the selectedItem and change the one of them color again to yellow?

    some months ago i had the similar issue about focus of RadComboBox ...
    i set the focus on RadComboBox And After SelectedIndexChanged CallBack (ServerSideEvent) focus was lost -> how can i fix this issue ?
    so important for me !

    thanks for attention
Back to Top