Datagrid copy
by Soulless on 11/1/2007 8:17:00 AM
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!
Re: Datagrid copy
by Nicholas Paldino [.NET/C# MVP] on 11/1/2007 7:01:00 PM
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).
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"Soulless" <dgmsalter@gmail.com> wrote in message
news:1193940372.524394.260520@e34g2000pro.googlegroups.com...
> 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!
>