Reputation: 33
I would like to change the Y location for a dataGridView to 75, I am trying to move it up at the click of a button.
have already tried
this.dataGridView1.Location = new Point(
this.dataGridView1.Location.X,
this.dataGridView1.Location.Y
);
Upvotes: 3
Views: 7059
Reputation: 1
Just try this:
dataGridView1.Left = 58; //X coordinate
dataGridView1.Top = 57; //Y coordinate
Upvotes: 0
Reputation: 300559
Presumably you meant:
this.dataGridView1.Location = new Point(this.dataGridView1.Location.X, 75);
Upvotes: 5