how to bold a particular item of a dataset programatically
-
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
-
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
-
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
-
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