Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
15920 | Jun 30,2004 01:55 PM UTC | Jul 1,2004 04:04 PM UTC | WinForms | 4 |
![]() |
Tags: GridControl |
private RichTextBox rtb = new RichTextBox(); private void gridDataBoundGrid1_DrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e) { if(e.Style.CellIdentity.ColIndex == 2) //use for column 2 { rtb.Clear(); rtb.SelectedText = e.DisplayText; string rtf = rtb.Rtf; Syncfusion.Drawing.RichTextPaint.DrawRichText(e.Graphics, rtb, rtf, this.gridDataBoundGrid1.PrintingMode, this.gridDataBoundGrid1.GridBounds, e.TextRectangle, this.gridDataBoundGrid1.GridBounds, e.Style.BackColor, e.Style.WrapText, 100, false); e.Cancel = true; } }Depending upon the version of the grid you are using, the DrawRichText method shown above may give a syntax error. If so, try removing the last argument.
>private RichTextBox rtb = new RichTextBox(); >private void gridDataBoundGrid1_DrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e) >{ > if(e.Style.CellIdentity.ColIndex == 2) //use for column 2 > { > rtb.Clear(); > rtb.SelectedText = e.DisplayText; > string rtf = rtb.Rtf; > Syncfusion.Drawing.RichTextPaint.DrawRichText(e.Graphics, rtb, rtf, this.gridDataBoundGrid1.PrintingMode, this.gridDataBoundGrid1.GridBounds, e.TextRectangle, >this.gridDataBoundGrid1.GridBounds, e.Style.BackColor, e.Style.WrapText, 100, false); > e.Cancel = true; > } >} >> >Depending upon the version of the grid you are using, the DrawRichText method shown above may give a syntax error. If so, try removing the last argument.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.