borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (Add, Delete, Edit Data in SQL Server using OleDbConnection, OleDbDataAdapter) New Topic New Poll Post Reply
AndreaVB Forum : VB.Net : DataGridView remove CurrentRow header triangle
Poster Message
MikeG
Level: Sage

Registered: 21-02-2003
Posts: 54

icon DataGridView remove CurrentRow header triangle

How can I remove the black triangle from the row header of a DataGridView result set.  I want to paint row numbers there but the triangle is in my way.

Thanks!


[Edited by MikeG on 30-07-2007 at 11:48 AM GMT]

30-07-2007 at 05:18 PM
View Profile Send Email to User Show All Posts | Quote Reply
MikeG
Level: Sage

Registered: 21-02-2003
Posts: 54
icon Re: DataGridView remove CurrentRow header triangle

Well...ok, I did run accross a solution.  It's not the one I was looking for but I'll share it.

On the DataGridView, you can set the padding property under RowHeadersDefaultCellStyle to some value that puts the triangle out of the displayable area of the control.  This is not too elegant, but it works.  

However, if anyone knows a better way, please let me know.

Thanks!

31-07-2007 at 11:56 PM
View Profile Send Email to User Show All Posts | Quote Reply
Nick2k3
Level: Big Cheese

Registered: 23-11-2003
Posts: 25
icon Re: DataGridView remove CurrentRow header triangle

quote:
MikeG wrote:
Well...ok, I did run accross a solution.  It's not the one I was looking for but I'll share it.

On the DataGridView, you can set the padding property under RowHeadersDefaultCellStyle to some value that puts the triangle out of the displayable area of the control.  This is not too elegant, but it works.  

However, if anyone knows a better way, please let me know.

Thanks!


you can always hide the rowheaders...and create a new column to serve as your rowheader...you have to do this by creating a  customized column that will act more like a cursor picture (or whatever you want it to look like and you can inherit from existing ones but i prefer to just base from  the plain column class and do what ever it is that you want)

(if you plan to paint the iterated numbers on the new column then use the textrenderer in conjunction)

...by the way that black cursor sucks....

____________________________
Error 404 ...File not found...!!!!
19-01-2008 at 09:01 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB.Net : DataGridView remove CurrentRow header triangle
Next Topic (Add, Delete, Edit Data in SQL Server using OleDbConnection, OleDbDataAdapter) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder