highlighting clicked row in radlistview

4 posts, 0 answers
  1. Ranjan
    Ranjan avatar
    38 posts
    Member since:
    Sep 2011

    Posted 29 Nov 2012 Link to this post

    I am using item template in radlistview control to create items of list.
    I am firing item command on item click. I want that when user click on item then that item looks highlighted on web page. How I will achieve that.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 29 Nov 2012 Link to this post


    Try the following code to make the item selected in listview.
    protected void RadListView1_ItemCommand(object sender, Telerik.Web.UI.RadListViewCommandEventArgs e)
      if (e.CommandName == "CommandName")
         RadListViewDataItem item = e.ListViewItem as RadListViewDataItem;
         item.Selected = true;

  3. Ranjan
    Ranjan avatar
    38 posts
    Member since:
    Sep 2011

    Posted 30 Nov 2012 Link to this post

    Thanks Princy,
    I am using your code but it is not showing clicked item as highlighted.
  4. Eyup
    Eyup avatar
    3298 posts

    Posted 04 Dec 2012 Link to this post

    Hello Ranjan,

    Have you tried setting CommandName to Select as demonstrated in the following demo:

    You could also fire a server side Select command:
    as well as a client side command:

    I hope this will prove helpful.

    All the best,
    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.
Back to Top