Wrox Programmer Forums
|
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 9th, 2005, 11:24 PM
Registered User
 
Join Date: Dec 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default coloring datagrid

Hi,

   How do I color the entire row in a datagrid based on a value in vb.net in windows application.please provide some sample code.can anyone help me.

thanks in advance
 
Old December 22nd, 2005, 01:11 AM
Registered User
 
Join Date: Nov 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Let assume your datagrid name is dgAllItem. Now use the datagrid itemdatabound event. The code is something like this.

private void dgAllItem_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e){
e.item.BackColor=Color.FromArgb(214,223,239);

Hope this will help you. Thanks....
}

Arindam Jha





Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell Coloring in VBA based on value in column FinalFive Excel VBA 3 March 24th, 2008 03:29 PM
help coloring individual listview item instead al method Visual C++ 1 August 1st, 2006 08:25 AM
Coloring forms rrojasg Excel VBA 1 July 14th, 2005 08:53 AM
coloring Button spraveens HTML Code Clinic 2 March 27th, 2004 06:02 AM
Coloring Information in Richtextbox Control bmains Pro VB.NET 2002/2003 0 August 13th, 2003 03:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.