need help with column.headerText display

Hello,

my output/display of my header text is coming out a little funky...

the output kinda looks like this:
OrderNumber
_____<arrow image appears here, not sure how to draw this>

I would like to have my header text appear like this:
OrderNumber
         <arrow image appears here>

in other words, have my arrow button somewhat centered underneath the header text.

below is the code for one of my column:

if (chkColumnSelect.Items[1].Selected == true)
{
      BoundColumn colNumber = new BoundColumn();
      colNumber.DataField = "OrderNumber";
      colNumber.SortExpression = "OrderNumber";
      thisGrid.Columns.Add(colNumber);
                        
      if ((string) Session["SortBy"] == "OrderNumber")
      {
            if((string) Session["OrderBy"] == "ASC")
            {
                  myCol.SortByOrderNumberAsc();
                  colNumber.HeaderText = @"Order Number <br> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp <img
                                                   src='../images/ARW05UP.ICO' border=0>";
            }
            else
            {
                  myCol.SortByOrderNumberDesc();
                  colNumber.HeaderText = @"Order Number <br> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp  <img
                                                   src='../images/ARW05DN.ICO' border=0>";
            }
      }
      else
      {
            colNumber.HeaderText = "Order Number";
      }
}

hope it kinda made sense....if not, please feel free to ask questions
LVL 7
brdrokAsked:
Who is Participating?
 
Abirami RajendranCommented:
I believe you are getting the line because of the &nbsp that you are adding. To position the header text center you can give  HeaderStyle-HorizontalAlign="Center" in the TemplateColumn


0
 
brdrokAuthor Commented:
i probably should have mentioned that this is the header text for the data grid...
0
 
brdrokAuthor Commented:
thanks for the pointer....

you mentioned templateColumn.  was afraid that i had to do some major re-writing but didn't realize that the bound column also has a headerStyle property


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.