Solved

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

Posted on 2004-03-25
5
176 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
  • 2
5 Comments
 
LVL 69

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 69

Expert Comment

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

My recommandation: Points to emoreau.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now