Solved

setting font.bold=true in datagrid in case...

Posted on 2004-03-25
5
181 Views
Last Modified: 2008-03-10
i have datagrid with 2 templated coulmns which give me name + profession from DB.
i have another field which it's value is 0
if the field value is 1 i want to change the font to bold . (name + profession will be bold in the specific row)
 
10x
e.
 
0
Comment
Question by:eladr
[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
  • 2
5 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 70 total points
ID: 10676436
0
 
LVL 7

Expert Comment

by:culshaja
ID: 10677986
If you are doing this in ASP.Net then use something like the following:

Private Sub dgResults_ItemDataBound(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgResults.ItemDataBound

        If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then

            If CType(CType(e.Item.DataItem, DataRowView).Row.Item(0), Integer) = 0 Then
                e.Item.BackColor = System.Drawing.Color.White
            End If

        End If

    End Sub

James :-)
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 10924167
I have given a valid link to answer.

My recommandation: Points to emoreau.
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

710 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