| |

VerySource

 Forgot password?
 Register
Search
View: 817|Reply: 8

(Winform) How to make a cell in Datagridview edited ???

[Copy link]

2

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-14 23:00:01
| Show all posts |Read mode
Now has the DataGridview control dgv_mannage_goods,
I now want to stop the cursor in a cell when the window loads?
Reply

Use magic Report

1

Threads

31

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 United States

Post time: 2020-8-11 13:15:01
| Show all posts
You can refer to the following code:
this.dataGridView1.CurrentCell = this.dataGridView1[2, 2];
this.dataGridView1.BeginEdit(true);
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-8-11 14:00:01
| Show all posts
You can try to set the EditItemIndex property of the DataGridview control to the row you want to edit.

If it doesn't work, tell me again.
Reply

Use magic Report

0

Threads

17

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-8-11 18:00:01
| Show all posts
Specify currentCell for DATAGRIDVIEW during load event.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-19 18:45:01
| Show all posts
Try SendKeys to simulate keystrokes
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-8-19 19:15:01
| Show all posts
Use a TextBox to set the same size as your GridCell. Use Cell events to trigger.
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-21 14:15:01
| Show all posts
Set the EditItemIndex of the DataGridview
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-21 14:45:01
| Show all posts
this.dataGridView1.CurrentCell = this.dataGridView1[2, 2];
this.dataGridView1.BeginEdit(true);
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-21 15:15:01
| Show all posts
this.dgv_mannage_goods.CurrentCell = this.dataGridView1.Rows[0].Cells[0];
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list