[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Gridview Location

Posted on 2009-07-06
4
Medium Priority
?
365 Views
Last Modified: 2012-05-07
Hi
I have a toolbar and a gridview on a form with the toolbar located at the top of the form and I am attempting to change the location of a gridview to place its top below the toolbar using

Me.QuoteGridView.Location = New System.Drawing.Point(0, 22)

but the gridview location doe's not change, can anyone spot the reason why?

Regards
Joe
0
Comment
Question by:JoeBo747
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:Woodz
ID: 24786011
Can you clarify the full data type of the QuoteGridView variable, as there are several GridView classes in the .NET framework.
0
 
LVL 1

Author Comment

by:JoeBo747
ID: 24786149
Hi Woodz

The QuoteGridView is a System.windows.Forms.datagridview

Regards
Joe

0
 
LVL 4

Accepted Solution

by:
Woodz earned 1000 total points
ID: 24788928
The command that you are using is correct for the task intended, so the problem could be caused by the location of this command. I have tested it with the command in the winform constructor, which is invoked before the screen is displayed, so the location value is correctly set before the screen is drawn.

If you are setting the location after it has been drawn, it may not take alter the position until the screen is refreshed, which you can force by calling Me.Refresh(). Alternatively, if you set the .Anchor or .Dock properties, this could override the explicit location setting.
0
 
LVL 1

Author Closing Comment

by:JoeBo747
ID: 31600103
Hi Woodz

With the dock removed the code works fine!

Regards
JoeBo
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question