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

Don't want to hightlight row

2 Answers 50 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Michael Pullella
Top achievements
Rank 1
Michael Pullella asked on 22 Jul 2010, 01:32 PM
Hello.

Any way to not highlight the row when the checkboxes are enabled?

<telerik:RadListBox ID="lstSubject" runat="server" CheckBoxes="true" Height="250" Width="100%" />

Just want the checkboxes, but do not want the row to be "selected" when the user clicks one.

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 22 Jul 2010, 02:09 PM
Hello Michael,

In order to achieve this attach 'OnClientSelectedIndexChanging' event and in the event handler cancel the selection of List item.

ASPX:
<telerik:RadListBox ID="lstSubject" runat="server" CheckBoxes="true" Height="250"
           Width="100%" OnClientSelectedIndexChanging="SelectedIndexChanging">
           <Items>
               <telerik:RadListBoxItem Text="aaa" />
               <telerik:RadListBoxItem Text="bbb" />
               <telerik:RadListBoxItem Text="ccc" />
               <telerik:RadListBoxItem Text="ddd" />
           </Items>
</telerik:RadListBox>

Java Script:
<script type="text/javascript">
    function SelectedIndexChanging(sender, args) {
        args.set_cancel(true);
    }
</script>

Thanks,
Princy.
0
msigman
Top achievements
Rank 2
answered on 22 Jul 2010, 07:16 PM
Michael,

This post seems relevant as well.
Tags
ListBox
Asked by
Michael Pullella
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
msigman
Top achievements
Rank 2
Share this question
or