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

Select/deselect all items

3 Answers 130 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
spt
Top achievements
Rank 1
spt asked on 24 Dec 2009, 10:03 AM
I want to add an icons to select/desect all items in the ListBox on the client side. Can you provide an example how to do this?

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 25 Dec 2009, 07:39 AM
Hello spt,

What do you mean by Icons? Do you want custom buttons that look like the Transfer/Reorder buttons? Or just a button placed anywhere on the page that should select/deselect? I will prepare example as soon as you clarify your requirements. As for the implementation, here is sample code:

function selectAll() {
            var listBox = $find("RadListBox1");        
            var count = listBox.get_items().get_count();
           
            for (var i = 0; i < count; i++) {
                listBox.getItem(i).select();
            }
        }


Sincerely yours,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
spt
Top achievements
Rank 1
answered on 25 Dec 2009, 08:17 AM
I meant buttons looks like the Transfer/Reorder.
I think you can include this feature in the next releases, it is very useful.
0
Genady Sergeev
Telerik team
answered on 25 Dec 2009, 04:53 PM
Hi spt,

I have prepared sample project demonstrating how to add additinoal buttons for select/deselect all. I will log your suggestion and if there are more customers that require it, we will consider implementing it. You can find the sample as an attachment.

Greetings,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ListBox
Asked by
spt
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
spt
Top achievements
Rank 1
Share this question
or