demoniumz
asked on
datagrid view properties
hello i use datagrid in a form and i want 1) to move the fields in the above photo in the center 2) put a color behind the fields 3) minus the font of the fields.How i can do these
i am using vb 2005
Thnks for the help
untitled.PNG
i am using vb 2005
Thnks for the help
untitled.PNG
ASKER
HELLO
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
center not work can i move the space between each field to be more nice
example ok (these i need to appear)
Categor Name !Category ident
not like these (appear now)
Categories Name ! Category ident ! picture !
example ok (these i need to appear)
Categor Name !Category ident
not like these (appear now)
Categories Name ! Category ident ! picture !
Can you show a picture ?
Just note that it will not be correctly center because some space on the right are reserved to the sort arrows. If you don't need to sort you can remove it that option and the text will be correctly at the center.
Just note that it will not be correctly center because some space on the right are reserved to the sort arrows. If you don't need to sort you can remove it that option and the text will be correctly at the center.
What jpaulino is saying is that, for instance, use this to center the header text:
Me.DataGridView1.RowHeader sDefaultCe llStyle.Al ignment = DataGridViewContentAlignme nt.MiddleC enter
and on the columns that you don't need to sort ascending or descending, to remove the sort glyph (the small triangle that appears on the header, right of the header text), use this for each column:
Me.DataGridView1.Columns(" CategoryNa me").SortM ode = DataGridViewColumnSortMode .NotSortab le
this will remove the sort glyph and allow the text to be sorted right on the middle of the column header.
jppinto
Me.DataGridView1.RowHeader
and on the columns that you don't need to sort ascending or descending, to remove the sort glyph (the small triangle that appears on the header, right of the header text), use this for each column:
Me.DataGridView1.Columns("
this will remove the sort glyph and allow the text to be sorted right on the middle of the column header.
jppinto
Check the picture of this post to see if this is what you're getting on the headers texts:
https://www.experts-exchange.com/questions/24303598/DataGridView-Header-text-not-centered.html
with my previous post, you will be able to solve the problem as I solved mine.
jppinto
https://www.experts-exchange.com/questions/24303598/DataGridView-Header-text-not-centered.html
with my previous post, you will be able to solve the problem as I solved mine.
jppinto
ASKER