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

Disable Selection of Items in Telerik Radlistbox

1 Answer 918 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Manshu
Top achievements
Rank 1
Manshu asked on 02 Jun 2016, 07:14 PM

I am using a telerik RadListbox to display a list of items.I don't want the user to be able to select any items from list.It is just for display

If I do Enable = "false" It grays out the items which I don't want. I want the items to be black and not selectable.

How can I override the default behavior when I do enable = false so that it doesn't grays out the test or any other way to make items not selectable.

 

Thanks,

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 07 Jun 2016, 10:34 AM
Hello Manshu,

You can use the following event handler to prevent the item selection:
<telerik:RadListBox ID="RadListBox1" runat="server"
    OnClientSelectedIndexChanging="listBoxSelecting">
JavaScript:
function listBoxSelecting(sender, args) {
    args.set_cancel(true);
}

Please give it a try and let me know if it works for you.

Regards,
Eyup
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
Manshu
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or