Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-03-25
5
Medium Priority
?
190 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 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

722 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