i have a datagrid which contains a CheckBox colum. now i want to pass values (just 1 column) from datagrid to listview based on which cell is checked. Untitled31

Picture shows that, once the cell is un-checked value disapears on listview.column 1.

Thanks daniweb in advance

loop through the datagridview to check weahter checkbox is checked and have the inner loop for listview and make the listview cell empty.

loop through the datagridview to check weahter checkbox is checked and have the inner loop for listview and make the listview cell empty.

What i want is that, when the user enters a value on datagridview.column1, and check cell on datagridview.column2, that value passes to listview in the same order. So I dont know how to bind datagridview.column1 and datagridview.column1.

i hope...this is more specific.

Thanks again

Hello......
I m a fresher in programming envrironment. I have one issue related to listview.
In my code I want to select one Room No:, so it should display appropriate info in listview... but the thing is it does not displying properly... & giving error "Invalid Property Value...

i dont know much about the list view control , but here is a code to get value of the cell from the datagrid whos checkbox is checked ,

dim myarr as new ArrayList
for i = 0 to datagridview1.rows.count-1

  if datagridview1.item(1,i).value = true then 
     myarr.add(datagridview1.item(0,i).value.tostring())
  end if 

next

this code will return array list , having all the values of the cell whos checkbox is checked. you can get these values by doing this

 for i = 0 to myarr.count -1 
  msgbox(myarr(i).value.tostring) ' i am not sure that is we need to getvalue then convert it into string or directly we can convert to string. please check it by your self as i am not at my home and also not in my office so i have no vs installed here ,
  msgbox(myarr(i).tostring)
 next 

hope this will help you to solve your prob ,

Regards

This article has been dead for over six months. Start a new discussion instead.