Click here to Skip to main content
15,910,872 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi, I am a new programmer of C#. First sorry mi English I am from Argentina.

I Create this DataGridView.
I need to fix this error: Picture
Columm Finish. And Also I want to remove the border of the rows.
And when I select a row, select al the rowcells.

Sorry my English. I don't use translator. :-D
Posted

You must be new.

First, the row selection is simple. In the Properties of the DataGridView, there is a property called SelectionMode. Change it to FullRowSelect.

Secondly, to get rid of the row borders, set CellBorderStyle to None.

I'm not sure if there was another question there or not...but that should help with the two I could answer.
 
Share this answer
 
If you're new to C#, it looks to me like you're working on a project far too complex for you.

I assume the 'error' in the picture is that the rows do not fill the grid. To fix this, you need to measure the control as a whole, then change the widths of your columns, so they add up to the size of the control as a whole. If your control does not resize, you can set this up in the properties of the designer, and not write any code at all.
 
Share this answer
 
You can set AutoSizeMode to Fill for the column you want to have fill the remaining available space in the DataGridView. You shouldn't need to calculate the space yourself.
 
Share this answer
 

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