Hey Gurus Grid View Control in windows .net application?

luckystars

Member
Joined
Mar 15, 2005
Messages
14
Programming Experience
1-3
Hi

I have recently came across an article by Michael Weinhardt called "Down the Rabbit Hole" which is a tour of the GridView Control. I am interested in using this control in an application that I am developing but have not came across on where to get this control. I am developing in the Microsoft Development Environment 2003 Version 7.1.3088.

Any direction one might provide would be greatly appreciated.

thanks
 
I have had people suggest using a helper function to do some of the things I am trying to achieve. They point me to aspalliance.com and search for helper functions and an article written by Colt Kwong but when I click the link to the helper function all I get is a "Sorry, we could not find that article."

http://aspalliance.com/30

Do you have any suggestions?
 
I am developing a windows application. I need to do several things. I need to freeze a couple of columns (like a freeze pane in excel), change the color of rows in a datagrid based on a value inside of my dataset I use as the datasource.

I knew the article was referring to a web application but I thought that if I could get an idea of how he did it in a web application that maybe I could figure it out in a windows application.

Any suggestions on how I might go about doing these things?
 
Hey TPM

I have been reading the article "Customizing the Windows Forms DataGrid" to try and color my datagrid rows based on a value inside of my datasource. I have gotten as far as the Implementing the Paint Override section and I am stuck. Would you be willing to help?
 
At the part of the article "Color Formatting" I have added the code snippet to my FormattableTextBoxColumn.vb class in the

Protected
Overloads Overrides Sub Paint method

Dim e As DataGridFormatCellEventArgs = Nothing

Dim col As Integer = Me.DataGridTableStyle.GridColumnStyles.IndexOf(Me)

e =
New DataGridFormatCellEventArgs(rowNum, col, Me.GetColumnValueAtRow([source], rowNum))

RaiseEvent SetCellFormat(Me, e)

Dim callBaseClass As Boolean = True

If Not (e.Backbrush Is Nothing) Then

backBrush = e.backbrush

End If

If Not (e.forebrush Is Nothing) Then

foreBrush = e.forebrush

End If

If Not e.usebaseclassdrawing Then

MyBase.Paint(g, bounds, [source], rowNum, backBrush, foreBrush, alignToRight)

End If

However I get "BackBrush is not a member of Auditing_Interface.DataGridFormatCellEventArgs"

I have obviously missed something. Please help.
 
On the IfNot (e.Backbrush IsNothing) Then ... line?

This all looks right exept you've got :
VB.NET:
[/color]
[color=#0000ff]If[size=2][color=#0000ff]Not[/color][/size][size=2][color=#000000] e.usebaseclassdrawing [/color][/size][size=2][color=#0000ff]Then

[/color][/size][size=2][color=#0000ff]MyBase[/color][/size][size=2][color=#000000].Paint(g, bounds, [source], rowNum, backBrush, foreBrush, alignToRight)

[/color][/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]If[/color][/size]

instead of:
VB.NET:
[/color]
If Not e.UseBaseClassDrawing Then
			callBaseClass = False
   End If
   
   If callBaseClass Then
		MyBase.Paint(g, bounds, _
		  [source], rowNum, backBrush, _
		  foreBrush, alignToRight)
   End If
 
Back
Top