Click here to Skip to main content
15,887,472 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
My code moves the rows and columns perfectly. But its moving the specific column with the remaining columns (ie) 2nd column means, moving 3rd,4th and so on. And vice versa.

Wanted to move only the 2nd column. Same process for row too.

Hope you understand my problem now.

Please help me.

CODE:

C#
try
  {
    if (resizing)
    {

      columnStyles[GColumn].SizeType = SizeType.Absolute;
      rowStyles[GRow].SizeType = SizeType.Absolute;
      rowStyles[GRow].Height += e.Y - rowStyles[GRow].Height;
      columnStyles[GColumn].Width += e.X - columnStyles[GColumn].Width;

    }
  }


GColumn takes column value=2 only during mouse click event.
Posted
Updated 29-Nov-11 2:43am
v3
Comments
RaisKazi 29-Nov-11 8:44am    
Edited: 1) Formatting 2) Added "pre" tag.
srinivasan_indian 29-Nov-11 9:17am    
Did u find any solution?
Rob Philpott 29-Nov-11 8:53am    
rowStyles[GRow].Height += e.Y - rowStyles[GRow].Height; ?

same as:

rowStyles[GRow].Height = e.Y;
srinivasan_indian 29-Nov-11 9:00am    
No. Not working. Both the rows are moving. Want to move only the specific row..Please help me...
Manfred Rudolf Bihy 29-Nov-11 9:51am    
You seem to be hard of reading. All Rob was saying that the first line of code is just a messy way of expressing the second code line.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900