Datagrid copy

  • Thread starter Thread starter Soulless
  • Start date Start date
S

Soulless

Hi, I have a datagrid with multiple columns and would like to copy the
contents of one column to another datagrid object that only has the
one column. I don't think copy can do this. Is there a method
available to do a copy of one column?

Thanks!
 
Soulless,

No, there isn't. If you knew the type/structure of the underlying data
sources directly, then I would say to work with those. If you don't, then
the only way to do this would be to access all the rows in the column you
want to access, and then assign the values to the column in the destination
data grid (through the grid itself, through the Item property, which will
return the DataGridViewCell instance you can get/set the Value property of).
 

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