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

Disabling a listview item

1 Answer 104 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 22 Aug 2012, 05:16 AM
I'm using a listview <ul>  in a settings page, and I'd like to be able to enable and disable each <li> line when it makes sense via Javascript. For instance, I have one line which shows how many records have been found on a server, such as "32 Records     > ", which the user could then click on to go to a view of those records.

However, if the network was not available, that item should read "Offline      ", in gray text with no arrow.

I can make it look just right if I remove the <a> tag around the text, and apply style="color:#808080" to the <li> item. But I can't get the appearance and behavior to change programmatically by, for instance, changing properties like the disabled of the <a>.

Suggestions?

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 24 Aug 2012, 06:46 AM
Hi John,

You can do that using one of the various jQuery manipulation methods - http://api.jquery.com/category/manipulation/.

Kind regards,
Petyo
the Telerik team
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
John
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or