Need help in Datagrids

angitapalli

Member
Joined
Mar 29, 2005
Messages
7
Programming Experience
1-3
Hi I need help in datagrid. I want a particular row (entire row not single cell) to be colored based on particular row number.. I can know the row number while programming. I want that specific row font color to be red. Does anybody have any ideas??

Thanks in advance..

Angitapalli.
 

kulrom

Well-known member
Joined
May 10, 2005
Messages
2,854
Location
Republic of Macedonia
Programming Experience
10+
http://www.vbdotnetforums.com/showthread.php?t=3094

get the latest attachment from the link to the above and add these 2 lines at the end of routine:
PrivateSub Button2_Click ....

VB.NET:
{...}
[size=2][color=#0000ff]Finally
 
[/color][/size][size=2]myGrid.Select(0) [/size][size=2][color=#008000]'myGrid.Select(1) if you want to select second row and so on ..
 
[/color][/size][size=2]myGrid.SelectionBackColor = Color.Black 'line 1 
myGrid.SelectionForeColor = Color.White 'line 2
 
[/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]Try
 
[/color][/size]{...}
Cheers ;)
 
Last edited:
Top Bottom