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

make current and visible

2 Answers 77 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Andre
Top achievements
Rank 1
Andre asked on 21 Jan 2019, 05:15 PM

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 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 22 Jan 2019, 09:59 AM
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.
0
Andre
Top achievements
Rank 1
answered on 23 Jan 2019, 04:47 PM
thank you very much dimitar !
your help is always appreciated.
Tags
ListView
Asked by
Andre
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Andre
Top achievements
Rank 1
Share this question
or