-
September 8th, 2017, 06:23 AM
#1
DataGridView Copying
I have a form with two totally identical DataGridView controls on it
The reason is that I have 30 plus columns of data and it is unreadable as a straightforward table. So, as a kludge, I duplicate them and position them so that (for example) the first copy shows columns 1 to 15 and the second copy (underneath) shows columns 16 to 30
Clearly, if I click on one of them (eg to sort or highlight) I trigger the other one so each one has to be identical (otherwise if I sort a column it will not be able to sort the second table). No problem, in principle
I adjust column widths to zero in order to "hide" the unwanted columns
Currently, I fill them both the hard way - I read data from a file and update values. Twice, which seems inelegant
So
1. Is there a better way?
2. If not, can I somehow copy a Grid and its contents without doing it the hard way? Eg Grid2 = Grid1
3. Can I hide a column - setting widths to zero is inelegant and looks messy?
Thank you
.
MOPEKS - a freeware program that generates programs that use each other to solve problems. Is this the correct route to a genuinely intelligent machine?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|