datatable columnname bold

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anina
    New Member
    • May 2010
    • 2

    #1

    datatable columnname bold

    Hi.
    I have a datatable and have done some columns.
    I want the columnname to be in bold. I´ve been looking on the internet for 5 hours now, but can´t find anything. Please help.

    Code:
    DataColumn column = new DataColumn();
    		column.ColumnName = "Svar";


    //Anna
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    There is no standard or portable way to make text bold. It depends on your output device or rendering program. How do you intend to view your data table? Is this decision up to you or are you constrained by somebody else's instructions?

    One possibility is to output an html file with appropriate tags and then use a browser to view it.
    tags = [B]tags[/ B] (no space between / and "B")

    Comment

    • anina
      New Member
      • May 2010
      • 2

      #3
      Originally posted by donbock
      There is no standard or portable way to make text bold. It depends on your output device or rendering program. How do you intend to view your data table? Is this decision up to you or are you constrained by somebody else's instructions?

      One possibility is to output an html file with appropriate tags and then use a browser to view it.
      tags = [B]tags[/ B] (no space between / and "B")
      It will be shown on a website. Later on i write
      row["Svar"] = alt.getValue();

      this is all done in c#, nothing in .net so i can´t find any toturials.
      i´ve also tried to use FontSize but can´t make it work.

      Comment

      • donbock
        Recognized Expert Top Contributor
        • Mar 2008
        • 2427

        #4
        Maybe C# has fancy methods that simplify generation of HTML; but I'm a longtime C programmer, all brute-force and no subtlety.

        You should have no trouble finding internet references for HTML tags. HTML files are entirely printable text.

        Use a dumb text editor (that doesn't expand HTML tags) to manually edit your output file to insert the appropriate tags. Then view the file with a browser. Repeat until you get the effect you want. Then modify your program to embed those tags in the text output.

        Comment

        • Banfa
          Recognized Expert Expert
          • Feb 2006
          • 9067

          #5
          Moved to C# forum

          Comment

          Working...