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

ListBox Multiple selection is not working in Mac with Command button

5 Answers 117 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 10 Sep 2012, 11:40 AM
HI Support,

I am using the listbox control and have SelectionMode="Multiple" and it works fine in window environment.

When I open the page in Mac book either through Safari or Firefox. it doesn't select multiple record with command Button.

This is urgent please reply me ASAP.

Thanks
Ajay


5 Answers, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 13 Sep 2012, 10:39 AM
Hi Nick,

The following JavaScript should help you to resolve the described issue:
var originalListBoxClickHandler = Telerik.Web.UI.RadListBox.prototype._onClick;
Telerik.Web.UI.RadListBox.prototype._onClick = function (e) {
    if (!e.ctrlKey)
        e.ctrlKey = e.metaKey;
 
    originalListBoxClickHandler.apply(this, [e]);
}

Regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Nick
Top achievements
Rank 1
answered on 15 Sep 2012, 05:18 AM
Hi Ivana,

Thanks for replying But can you tell me how I can use this javascript.

Below is my html code example.

 <telerik:radlistbox id="lstEmployee" runat="server" height="150px" width="150px"
                                                                                            selectionmode="Multiple">
                                                                                        </telerik:radlistbox>

Below is java script block.

<script type="text/javascript" language="javascript">

            var originalListBoxClickHandler = Telerik.Web.UI.RadListBox.prototype._onClick;
            Telerik.Web.UI.RadListBox.prototype._onClick = function (e) {
                if (!e.ctrlKey)
                    e.ctrlKey = e.metaKey;

                originalListBoxClickHandler.apply(this, [e]);
            }
</script>

Thanks
Nick
0
Ivana
Telerik team
answered on 18 Sep 2012, 12:35 PM
Hello Nick,

You just need to put it on the page, in a <script> block,  where the RadListBox is defined . The JavaScript code will be fired when you click on an item in RadListBox. It is a workaround for the multiple selection in RadListBox in Mac so multiple items can be selected when holding the command button and clicking on an item.

Regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Brian
Top achievements
Rank 1
answered on 05 Feb 2013, 03:06 PM
Has this been fixed.  I have a customer that is reporting the same thing.  I would rather not add java script to every page that contains a listbox as I have over 100 pages that would need this code.
0
Nencho
Telerik team
answered on 08 Feb 2013, 09:43 AM
Hello Brian,

That the above demonstrated workaround would be included in our upcoming official release - Q1 2013, which is scheduled for  20th of February.

Greetings,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ListBox
Asked by
Nick
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Nick
Top achievements
Rank 1
Brian
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or