Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to bold a particular item of a dataset programatically

how to bold a particular item of a dataset programatically

Scheduled Pinned Locked Moved ASP.NET
tutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gogal1983
    wrote on last edited by
    #1

    how to bold a particular item of a dataset programatically. Thanx in advance

    C K 2 Replies Last reply
    0
    • G gogal1983

      how to bold a particular item of a dataset programatically. Thanx in advance

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Well, no item in a dataset is bold, obviously. So, you need to write code that inserts bold tags only for the items you want to view as bold. Which typically means binding the whole field to a code behind method which returns the item, but wraps it in bold tags if needed, or having a label that shows the field, and have the weight of the font on the label set by a method which passes the data to a code behind method.

      Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

      G 1 Reply Last reply
      0
      • C Christian Graus

        Well, no item in a dataset is bold, obviously. So, you need to write code that inserts bold tags only for the items you want to view as bold. Which typically means binding the whole field to a code behind method which returns the item, but wraps it in bold tags if needed, or having a label that shows the field, and have the weight of the font on the label set by a method which passes the data to a code behind method.

        Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

        G Offline
        G Offline
        gogal1983
        wrote on last edited by
        #3

        Thanx for the responses. can you explain it with an example.

        C 1 Reply Last reply
        0
        • G gogal1983

          how to bold a particular item of a dataset programatically. Thanx in advance

          K Offline
          K Offline
          Kapil Thakur
          wrote on last edited by
          #4

          Dataset does not supports adding styles or formatting for text. However you can add style or text formatting to its binding control like gridview etc.

          Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

          1 Reply Last reply
          0
          • G gogal1983

            Thanx for the responses. can you explain it with an example.

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Well, how are you displaying it ? You'd end up with something like That's SO rough, that I recommend you do some actual research for real examples, but MyFunction is a method on your page, that takes an object, which is the data you display, and parses it to return the strings Normal or Bold.

            Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups