Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-03-25
5
Medium Priority
?
195 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
3 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 280 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
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…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Loops Section Overview

824 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