Disabling a listview item

2 posts, 0 answers
  1. John
    John avatar
    6 posts
    Member since:
    Aug 2012

    Posted 22 Aug 2012 Link to this post

    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>.


  2. Petyo
    Petyo avatar
    2437 posts

    Posted 24 Aug 2012 Link to this post

    Hi John,

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

    Kind regards,
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top