make current and visible

3 posts, 1 answers
  1. Andre
    Andre avatar
    41 posts
    Member since:
    Feb 2018

    Posted 21 Jan 2019 Link to this post

    how do i select an item programmatically in my listview so that the group is expanded, the item is selected and current, like radgridview isVisible = true, isCurrent = true ?

     

    thanks

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    2938 posts

    Posted 22 Jan 2019 Link to this post

    Hi Andre,

    There is no built-in method for this. You will need to manually expand the ground and set the selected item. For example:
    private void radButton1_Click(object sender, EventArgs e)
    {
        var item = radListView1.Items[99];
        if (item.Group != null && !item.Group.Expanded)
        {
            item.Group.Expanded = true;
        }
        radListView1.SelectedItem = item;
    }

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Andre
    Andre avatar
    41 posts
    Member since:
    Feb 2018

    Posted 23 Jan 2019 in reply to Dimitar Link to this post

    thank you very much dimitar !
    your help is always appreciated.
Back to Top