1

Gridview

Ok I have this gridview (poor styling I know), but the problem is the column on the left with the little arrow in it indicating where our selection is. I have tried everything to get rid of that, tried all the properties I could think of etc ... with no luck, I am bound to have missed something.

q) Can this column be removed? q) If so, how please?

UPDATE 1

I tried removing the Headers - which I didn't think was the problem and it did not solve the issue. As you can see the left column still exists. Can the left column be removed and if so, how?

Headers-Removed

UPDATE 2

The Second Image shows the Row Headers removed (notice - no text saying Description and Details)

The third image (below) shows the result of Column[0] being hidden. (No data loaded) we still see the blank left column, the Description Column is missing (hidden) and we are left with Details...

I am trying to get the first column hidden equivelant of Column[-1] hidden, if that makes any sense.

enter image description here

1 Answer 1

5

This is a row header. It can be removed.
Through designer(or by code) set datagridview's property .RowHeadersVisible = False

mydatagridview.RowHeadersVisible = False;

You can hide this/left column

mydatagridview.Columns[0].Visible = false;
5
  • That only removes the header not the Left column as requested... as you can see from the updated image above. Jan 16, 2014 at 13:44
  • Thanks Fabio - will check tomorrow - in the middle of a massive refactoring at the moment :P Jan 16, 2014 at 20:10
  • tried that - actually as suspected that removes the Description Column and not the first blank column on the left. Jan 16, 2014 at 22:31
  • 1
    On your picture three columns: RowHeader, Description column, Details column. RowHeader can be hidden, so Description column too. What you mean by "Left blank column" ? Please, then show picture with hidden RowHeader and Description column
    – Fabio
    Jan 17, 2014 at 1:40
  • Ok tried again - and it worked - forgive me - marked you up for it... It was RowHeadersVisible as you said. Jan 17, 2014 at 3:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.