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

Manually Triggering ListView Events

5 Answers 412 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Ceyhun
Top achievements
Rank 1
Ceyhun asked on 21 Jul 2014, 11:27 AM
Hello,

We implemented a custom event on a ListView object's onClick, and we wish to trigger the native click event manually. 
We tried using jQuery's default trigger("click") and normal javascript click functions, but with no avail. Are there no native 
functions that we can use to trigger this native event?

Thanks and hope to hear from you asap

5 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 21 Jul 2014, 12:21 PM
Hello Ceyhun,

I have tested triggering the Kendo UI ListView click event manually in the following jsBin and it seems to be working as expected. Please check it out and let me know if it helps:

http://jsbin.com/hezipu/1/edit

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Jamie
Top achievements
Rank 1
answered on 01 Aug 2014, 09:53 PM
Hello,

I want similar functionality. but trigger("click") doesn't work. I am using this in splitview. where i have to show default first selected link 
0
Kiril Nikolov
Telerik team
answered on 04 Aug 2014, 11:47 AM
Hello Jamie,

I am not really sure what is the issue that you are facing. Can you please put together a Kendo UI Dojo sample where we can reproduce it? A more detailed explanation will also be appreciated.

Thank you in advance for your cooperation.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Vedat
Top achievements
Rank 1
answered on 26 Aug 2014, 01:48 PM
Hello Kiril,

Triggering the Kendo UI ListView click event manually to be working as expected. But I need to trigger an item click event in Kendo UI ListView manually. This is not triggered as expected. I want to trigger click event of a li element in Kendo UI Listview. Please check it out:

http://jsbin.com/buzadumudapo/1/edit

Regards,
Vedat Kılıç



0
Kiril Nikolov
Telerik team
answered on 27 Aug 2014, 08:53 AM
Hello Vedat,

Triggering click on a specific element of the ListView is not a trivial task to do and does not make much sense. I would suggest you to directly call the event handler with the required parameters. If you elaborate a bit more about what exactly you are trying to achieve, we can suggest you a better approach. If you want to navigate to another view, then you can just call the navigate() method of the application.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
ListView (Mobile)
Asked by
Ceyhun
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Jamie
Top achievements
Rank 1
Vedat
Top achievements
Rank 1
Share this question
or