listview question

  • Thread starter Thread starter Jassim Rahma
  • Start date Start date
J

Jassim Rahma

hi,

i have two listview controls, lstAvailable and lstSelected. I want to check
if an item is exists in the lstSelected then it should be removed from the
lstAvailable.

how can i do that?
 
try this:

if (lstSelected.SelectedItems.Count > 0)
{
if (lstAvailable.Items.Contains(lstSelected.SelectedItems[0]))
{
llstAvailable.Items.Remove(lstSelected.SelectedItems[0]);
}
}
 
try this:

if (lstSelected.SelectedItems.Count > 0)
{
if (lstAvailable.Items.Contains(lstSelected.SelectedItems[0]))
{
llstAvailable.Items.Remove(lstSelected.SelectedItems[0]);
}
}
 
hi,

i have two listview controls, lstAvailable and lstSelected. I want to check
if an item is exists in the lstSelected then it should be removed from the
lstAvailable.

how can i do that?

try this:

if (lstSelected.SelectedItems.Count > 0)
{
if (lstAvailable.Items.Contains(lstSelected.SelectedItems[0]))
{
llstAvailable.Items.Remove(lstSelected.SelectedItems[0]);
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top