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

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

3 Answers 104 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Majid Darab
Top achievements
Rank 1
Majid Darab asked on 13 May 2011, 10:52 AM

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

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 1
answered on 13 May 2011, 11:18 AM
Hello Majid,

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

Thanks,
Princy.
0
Majid Darab
Top achievements
Rank 1
answered on 13 May 2011, 05:46 PM
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?
0
Majid Darab
Top achievements
Rank 1
answered on 13 May 2011, 05:56 PM
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
Tags
ListBox
Asked by
Majid Darab
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Majid Darab
Top achievements
Rank 1
Share this question
or