Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Change a cell in a C# desktop app datagrid

Posted on 2004-09-28
1
Medium Priority
?
186 Views
Last Modified: 2010-04-15
ok first off this is a desktop app I found a few solutions to this on the web but they all seem to only work for web application.

What I have is a datagrid comprised of 4 columns and numerous rows. whenever the second, third and forth cells in any row are equal to null I want to set the first cells font to bold. Any ideas?
0
Comment
Question by:toby_lang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
ryeandi earned 375 total points
ID: 12181097
hi toby

take a look at this link:

http://www.dotnet247.com/247reference/a.aspx?u=http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp

specifically faq 5.67.

in the code example that is associated with the above link you'll need to modify your FormatGridCells event handler to look something like this:

private void FormatGridCells(object sender, DataGridFormatCellEventArgs e)
{
if(dg[e.Row,1].ToString() == dg[e.Row,2].ToString() &&
   dg[e.Row,2].ToString() == dg[e.Row,3].ToString()
{
  e.TextFont = new Font(e.TextFont.Name, e.TextFont.Size, FontStyle.Bold);
}
}

hope this helps,

rye
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question