LMGONCA
asked on
How to change the color of a datagrid row in VB.NET?
I'm trying to change the full row color for a datagrid in VB.NET?
Can you please explain me how to do this?
Can you please explain me how to do this?
ASKER
Hi.
1 row based in some criteria in a cell of that row.
Backcolor.
Regards.
LMG
1 row based in some criteria in a cell of that row.
Backcolor.
Regards.
LMG
After <asp:datagrid> declaration u can use
<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></Sele ctedItemSt yle>
<AlternatingItemStyle cssclass="EvenRow"></Alter natingItem Style>
<ItemStyle CssClass="OddRow"></ItemSt yle>
In the CssClass u can have the properties of OddRow and EvenRow where u can specify the foreground color
<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></Sele
<AlternatingItemStyle cssclass="EvenRow"></Alter
<ItemStyle CssClass="OddRow"></ItemSt
In the CssClass u can have the properties of OddRow and EvenRow where u can specify the foreground color
Hi LMGONCA
refer the link
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#Top
Question : 5.14
regards
prakash
ASKER
I've went trought the syncfusion link (in fact I had been exploring the link already) but I don't see any question directly related with mine (if so can you please tell me the number?).
Regards.
LMG
Regards.
LMG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
it is use for changing row color
Me.DataGrid1.AlternatingBa ckColor = Color.LightBlue
Me.DataGrid1.AlternatingBa
the code planocz posted colors only current cell not entire row, and this is almost same as syncfusion's example
Are you want to set single row or all rows color ? back color or fore color?
regards
prakash