• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

How do I change font properties for the high value returned from each column in a datalist?

I would like to display the high value in each column of a datalist in bold.


Employee    hours      sales
emp1           6              <b>1</b>
emp2          <b>7</b>     0

I assume I achieve this in itemdatabound, but I'm stuck.

  • 2
1 Solution
Ok, to do it in your ITemDatabound event, you will first need to know which column has the greatest value, you can do this by looping the values and storing the index. Then looping again and when the index you saved has been met, you can make that column bold?
Does this sound like a method you could implement?
rpm962Author Commented:
Thanks for the prompt response.  I think I can handle that, yeah.  Is achieving this in the ItemDatabound event the best way to go about it?
i would say so yes because you are formatting before the data has even been bound, its better than actually looping the table once it has been rendered
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now