Click to See Complete Forum and Search --> : Listview control


anita_vs
August 15th, 2001, 04:54 PM
Hi,

I'm using listview control on my form.

But by default it is selecting first element.

When user selectes the item then only it has to select item.

I checked with
ListView.ListItems(I).Selected = True

How to solve this

Thanks,
Anita

Greenu Sharma
August 16th, 2001, 01:50 AM
Change the focus from the list view

raghu_nv
August 16th, 2001, 04:05 AM
Try this
Set ListView.SelectedItem=Nothing

anita_vs
August 16th, 2001, 11:46 AM
Hi Raghu,

That is not working.

Any other suggestion?

Thanks
Anita

anita_vs
August 16th, 2001, 11:47 AM
Hi Greenu,

That is not working.

Any other suggestion?

Thanks
Anita

michi
August 16th, 2001, 12:39 PM
Add the following code in Form_Load, just after you added all listitems into the listview.

========
ListView.SelectedItem.Selected = False
=========


Regards,

Michi

anita_vs
August 16th, 2001, 03:43 PM
Perfect!!!!

Thanks,
Anita

Greenu Sharma
August 16th, 2001, 11:17 PM
please check the option hide selection in the properties of the list view.Then try changing the focus

Greenu Sharma
August 16th, 2001, 11:27 PM
The option given by Michi works good ...