<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Project: Customizing the Windows Forms DataGrid</title>
	<atom:link href="http://www.experimentalspace.com/index.php/2005/05/project-customizing-the-windows-forms-datagrid/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.experimentalspace.com/index.php/2005/05/project-customizing-the-windows-forms-datagrid/</link>
	<description>Trying out new things, technical and crafty!</description>
	<lastBuildDate>Tue, 17 Aug 2010 08:41:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Lacuna</title>
		<link>http://www.experimentalspace.com/index.php/2005/05/project-customizing-the-windows-forms-datagrid/comment-page-1/#comment-3</link>
		<dc:creator>Lacuna</dc:creator>
		<pubDate>Wed, 25 May 2005 16:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://temp.experimentalspace.com/?p=5#comment-3</guid>
		<description>Basic steps to creating a customized datagrid in vb.net.

Note: This is just the main bits, there are little pieces that need to be coded here and there to complete it.

1) Declare your variables
Private disabledBackBrush As Brush
Private disabledTextBrush As Brush
Private currentRowFont As Font
Private currentRowBackBrush As Brush
*************************
2) Give your brushes values
Me.disabledBackBrush = New SolidBrush(SystemColors.InactiveCaptionText)
Me.disabledTextBrush = New SolidBrush(SystemColors.GrayText)
Me.currentRowFont = New Font(Me.DataGrid1.Font.Name, Me.DataGrid1.Font.Size, FontStyle.Bold)
Me.currentRowBackBrush = Brushes.Pink
******************************
3) Have it activate the colours depending on when you want it to change from the basic settings.
If e.Column &gt; 0 AndAlso Me.DataGrid1(e.Row, 7) = 0 Then &#039;discontinued?
e.BackBrush = Me.currentRowBackBrush
e.TextFont = Me.currentRowFont
ElseIf e.Column &gt; 0 AndAlso e.Row = Me.DataGrid1.CurrentRowIndex Then &#039;currentrow?
e.BackBrush = Me.disabledBackBrush
e.ForeBrush = Me.disabledTextBrush
End If</description>
		<content:encoded><![CDATA[<p>Basic steps to creating a customized datagrid in vb.net.</p>
<p>Note: This is just the main bits, there are little pieces that need to be coded here and there to complete it.</p>
<p>1) Declare your variables<br />
Private disabledBackBrush As Brush<br />
Private disabledTextBrush As Brush<br />
Private currentRowFont As Font<br />
Private currentRowBackBrush As Brush<br />
*************************<br />
2) Give your brushes values<br />
Me.disabledBackBrush = New SolidBrush(SystemColors.InactiveCaptionText)<br />
Me.disabledTextBrush = New SolidBrush(SystemColors.GrayText)<br />
Me.currentRowFont = New Font(Me.DataGrid1.Font.Name, Me.DataGrid1.Font.Size, FontStyle.Bold)<br />
Me.currentRowBackBrush = Brushes.Pink<br />
******************************<br />
3) Have it activate the colours depending on when you want it to change from the basic settings.<br />
If e.Column &gt; 0 AndAlso Me.DataGrid1(e.Row, 7) = 0 Then &#8216;discontinued?<br />
e.BackBrush = Me.currentRowBackBrush<br />
e.TextFont = Me.currentRowFont<br />
ElseIf e.Column &gt; 0 AndAlso e.Row = Me.DataGrid1.CurrentRowIndex Then &#8216;currentrow?<br />
e.BackBrush = Me.disabledBackBrush<br />
e.ForeBrush = Me.disabledTextBrush<br />
End If</p>
]]></content:encoded>
	</item>
</channel>
</rss>
