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

StringFormatFlags.NoClip

1 Answer 223 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mh
Top achievements
Rank 1
Mh asked on 15 Apr 2014, 06:16 AM
Hi everybody,

During the action of RadGridView print, how can I increase the height of the Cells(whole row) only which have multiple rows when using (StringFormatFlags.NoClip)

 private void DGV_Main_PrintCellFormatting(object sender, PrintCellFormattingEventArgs e)
        {
            e.PrintCell.StringFormatFlags = StringFormatFlags.NoClip;   
       }

1 Answer, 1 is accepted

Sort by
0
Accepted
Ralitsa
Telerik team
answered on 16 Apr 2014, 07:53 AM
Hi Mh Almasri, 

Thank you for contacting us. 

You need to set the AutoSizeRows and WrapText property to true in Form's constructor . Please take a look at the following code snippet: 
public Form1()
        {
            InitializeComponent();
            this.radGridView1.AutoSizeRows = true;
            for (int j = 0; j < this.radGridView1.Columns.Count; j++)
            {
                this.radGridView1.Columns[j].WrapText = true;
            }
 
            this.radGridView1.PrintCellFormatting += radGridView1_PrintCellFormatting;
        }
 
        void radGridView1_PrintCellFormatting(object sender, PrintCellFormattingEventArgs e)
        {
            e.PrintCell.StringFormatFlags = StringFormatFlags.NoClip;
        }

Hope this will help you. Let me know if you have any other questions.

Regards,
Ralitsa
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Mh
Top achievements
Rank 1
Answers by
Ralitsa
Telerik team
Share this question
or