473,657 Members | 2,371 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 8864
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.co m

"cooll" <co***@discussi ons.microsoft.c omwrote in message
news:B3******** *************** ***********@mic rosoft.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.dataGridVi ew1.Columns["doodaa"].DefaultCellSty le.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
3967
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 textarea input field, then will insert html tags accordingly. So, the user writes up a document in word that contains instances of italics, bold, and underline. The user then copies the text of that document into my textarea field. I am trying...
2
1425
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 don't want them to have mess with this field. ----- Dim ds as new dataset Dim objCommand as new oledbCommand(strSQL, objConn) Dim myCommand as new OleDbDataAdapter(strSQL, objConn)
2
4585
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 cboPrio.Text value for example ) Email_AutoSend(sEmailTo, USER.Name, cboPrio.Text )
5
30084
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 HTML: <h1 id = "MyID1" class = "Style-MyText">.</h1> JavaScript: document.getElementById("MyID1").firstChild.replaceData(0, document.getElementById("MyID1").firstChild.nodeValue.length, "This text is normal. <b>This text is bold.</b>");
9
54385
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
12786
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 to read text file but could not get the data in correct format. All columns are not coming in dataset and rows are messing up. Suggestions please ???
1
2982
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
7604
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 because the text should only display if certain criteria is met, so it's more complicated with 2 text boxes... Here is my code... Function Relation(LOA2 As Variant, Details2 As Variant) Select Case LOA2
0
1594
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 widget. Changing the color is easier, you only change the foreground option.
0
8399
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6169
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4159
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1622
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.