This is a migrated thread and some comments may be shown as answers.

Printing Top and Bottom borders only

0 Answers 125 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Fadi
Top achievements
Rank 1
Fadi asked on 01 Mar 2013, 01:44 PM
I am printing a telerik GridView, and under some conditions i want to hide the left and right borders of the cell. I have tried the below code but it did not work as it is removing the top and bottom borders also. 

private void radGridView1_PrintCellFormatting(object sender, PrintCellFormattingEventArgs e)
      {
          if (e.Row is GridViewDataRowInfo)
          {               
              string s = (string)e.Row.Cells[0].Value;
              if (s == "Total" || s=="")
              {
                  e.PrintCell.DrawFill = true;
                  e.PrintCell.Font = new System.Drawing.Font(radGridView1.Font, FontStyle.Bold);
                  e.PrintCell.DrawBorder = false;
              }      
          }
     }

How could i only remove the left and right borders...

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Fadi
Top achievements
Rank 1
Share this question
or