473,505 Members | 14,394 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Bold the text in a field at DataTable

I wonder if I have a DataTable instance, and I want to bold a the text in a
specific field. How can I do that.
Oct 17 '07 #1
2 8819
Cooll,

Well, DataTables in themselves are not used to display data, they are
data sources themselves. The answer you are looking for is going to depend
on whether you are binding it to a grid in ASP.NET, or using the DataGrid or
DataGridView controls in Windows Forms.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"cooll" <co***@discussions.microsoft.comwrote in message
news:B3**********************************@microsof t.com...
>I wonder if I have a DataTable instance, and I want to bold a the text in
a
specific field. How can I do that.

Oct 17 '07 #2
This is done in the object that is bound to the data table, such as a
datagridview.

for example...
this.dataGridView1.Columns["doodaa"].DefaultCellStyle.Font = new
Font("Verdana", 12, FontStyle.Bold);

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

cooll wrote:
I wonder if I have a DataTable instance, and I want to bold a the text in a
specific field. How can I do that.
Oct 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
3931
by: Bob | last post by:
Hello: I could use some regular expression help. I'm trying to create a client-side javascript function that will test user input to determine the markup of text that has been copied into a...
2
1417
by: Will Chamberlain | last post by:
I'm trying to populate a label that is located in the Footer Template of my DataGrid. I want this to be displayed in a label instead of a textbox when the user wants to add a new record because I...
2
4579
by: yer darn tootin | last post by:
Hello, I have a method which takes various string values to create an automated email. Anyone know how I can make a particular string value passed appear in bold type in the email? ( below, the...
5
30069
by: Stefan Mueller | last post by:
In HTML I use <b>...</b> to make parts of a text bold. <h1 class = "Style-MyText">This text is normal. <b>This text is bold.</b></h1> Now I'd like to do the same with a JavaScript. I tried...
9
54344
by: Jason | last post by:
If I've got Me.RichTextBox1.Text = "In Ricn Tex Box" Me.RichTextBox1.Text &= "Line two" & vbCrLf How do I make the first line appear BOLD?
4
12767
by: Amit Maheshwari | last post by:
I need to read text file having data either comma seperated or tab seperated or any custom seperator and convert into a DataSet in C# . I tried Microsoft Text Driver and Microsoft.Jet.OLEDB.4.0...
1
2951
by: shapper | last post by:
Hello, How can I make a GridView Bond Field to display its text in Bold? I couldn't find any CssClass or Bold property in the Bound Field. Thanks, Miguel
5
7598
by: Coll | last post by:
Hi - I have a function that returns a value to a text field. I need to bold a portion of the text field to match up with the rest of the form. I'd rather not split it into two separate text fields...
0
1587
by: Guilherme Polo | last post by:
On Thu, Sep 18, 2008 at 1:06 PM, April Lekin <lekin2@llnl.govwrote: Yes. You could separate them in two labels (if you are using labels), or apply a different tag if you are using a Text...
0
7216
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7303
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.