473,789 Members | 2,431 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can Windows datagrids have rows of different colors?

VMI
Can the Windows datagrid in VS.Net '05 have rows of different colors? I'm
trying to build an Outlook-style scheduler and I need to emulate the Calendar
so that the rows change colors based on the appointments I've made (i.e. a
row with no appointment has a different color than a row with a scheduled
appointment).

Thanks.
Feb 1 '06 #1
1 1546
VMI,
Yes, they can. You will need to implement a custom TextBoxColumn class
derived from DataGridTextBox Column, iterate over all the columns checking for
your "flag" text that triggers the coloring, and then apply that unique
TableStyle to all the cells in that row.

George Shepherds' Windows Forms FAQ site has some sample code.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"VMI" wrote:
Can the Windows datagrid in VS.Net '05 have rows of different colors? I'm
trying to build an Outlook-style scheduler and I need to emulate the Calendar
so that the rows change colors based on the appointments I've made (i.e. a
row with no appointment has a different color than a row with a scheduled
appointment).

Thanks.

Feb 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
16224
by: Phil Stanton | last post by:
When designing a new form or report, the Default ForeColor is often something like -2147483640 which is the colour of Windows text (possibly black) and the default backColor is -2147483643 (possibly white) Can anyone tell me how to convert these colours to either RGB colours or the Long number used by Access. Black is 0 and White is 16777215 ...
2
3389
by: melanieab | last post by:
Hi, Ok, I'm on my own in learning c# for work here and have come pretty far, but I'm confused by all the options available for datagrids. I have a private datagrid (dg), private dataset (ds), and private datatable (tCat) all declared at the very beginning. When I click on the tabpage that contains the all these, I first MakeDataSet (below), then dg.SetDataBinding(ds, "Catalog"). Bear with me, I want to make sure I'm doing things right...
2
2970
by: David R. Longnecker | last post by:
While attempting to migrate from my old "loop through all records" mindset with ADO 3.0 and into the ADO.NET arena, I've come across an issue using DataGrids with the OLEDB and Oracle data connection objects. I began using the C# MSDN article (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkWalkthroughUsingDataGridWebControlToReadWriteData.asp) on DataGrid web controls and was very successful until... --...
2
1451
by: simchajoy2000 | last post by:
Hi, In the VB.NET code behind ASP.NET, the programmer is able to directly access the columns and rows associated with the datagrid. Why are datagrids in VB.NET window forms so different? The only way I have figured out how to manipulate the columns and rows in a datagrid is to use data tables. So if I want to change any values contained in the datagrid table or to hide or show different columns depending on different criteria, I must...
4
2060
by: Dany P. Wu | last post by:
Hi everyone, I'm not entirely sure if this is the best way of going about it, but here's the scenario.......... I have two datagrid, each bound to a datatable which have checkbox columns. There are two buttons between the datagrids, "Add" and "Remove". They basically remove rows from one grid to the other, only those with the checkbox ticked.
3
1977
by: Mark Wiewel | last post by:
hi all, i am a newbie in ASP.NET and i couldn't find the solution to this one: i have a form with three datagrids on it. i would like to align them vertically with a space between each grid of about 20px. the amount of rows in those grids is changing, but the position of each datagrid seems to be fixed. this results in a grid overlaying another one or the space between two grids is way too high.
1
1158
by: tshad | last post by:
I am trying to find the differences between handling of DataGrids in Windows Forms and Asp.Net. They are completely different in how you bind to them, get number of rows, look at columns and rows, selecting rows, handling events, etc. I know how to handle them in Asp.net, but not as sure when dealing with DataGrids in a Windows Form. Where would I find some good articles on these?
1
1658
by: nido | last post by:
Develop a windows based drawing application. This application is used for drawing different primitive figures with different colors, brushes, x coordinate, y coordinate and other different attributes. This application must have the ability to draw text in different colors, size and font style. The application must have the options to make the text bold, italicized and underline. The application must contain five drop down menus. “Draw...
3
3928
by: nigelesquire | last post by:
Please help! I'm trying to clone and delete multiple rows with JavaScript. I need two delete buttons that work...! I only have one for now, but it's not working properly, the output count is messing up. Problems:
0
9663
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10193
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6761
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4089
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.