Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide C# DataGridView default * row?

C# DataGridView controls have a default, empty last row, marked with a *. How can I hide it?

like image 675
MD-11 Avatar asked Sep 16 '11 08:09

MD-11


People also ask

How do I hide my C?

Use the Windows key + X keyboard shortcut and select Disk Management. Right-click the drive you want to hide and choose Change Drive Letter and Paths. Select the drive letter and click the Remove button.

Can I hide drive C?

Right-click the drive you want to hide and select the Change Drive Letter and Paths... Step 3. Remove the drive letter. Click the drive letter and click the Remove button.

How do I hide c drive in File Explorer?

Open the following sections: User Configuration, Administrative Templates, Windows Components, and Windows Explorer. Click Hide these specified drives in My Computer. Click to select the Hide these specified drives in My Computer check box. Click the appropriate option in the drop-down box.


2 Answers

The row you speak of is the 'new row' row. This can be hidden by setting the AllowUserToAddRows property to false.

Alternatively you can uncheck the 'Enable Adding' tick box in the DataGridView Tasks dialog. See below:

like image 127
Ant Swift Avatar answered Oct 19 '22 23:10

Ant Swift


Disable AllowUserToAddRows property. This property indicating whether the option to add rows(that you call default * row) is displayed to the user.

like image 27
Renatas M. Avatar answered Oct 20 '22 00:10

Renatas M.