We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

grid row height with RTB

Thread ID:

Created:

Updated:

Platform:

Replies:

17153 Aug 2,2004 03:51 PM UTC Aug 2,2004 06:55 PM UTC Windows Forms 2
loading
Tags: GridControl
James A Frisby(For EPS - Computer Software)
Asked On August 2, 2004 03:51 PM UTC

Clay, You suggested the code below to allow the grid to show text with embedded tab characters. This works properly, however it often doesn''t make the row in the grid tall enough to show the last line. Is it possible for me to add a "fudge" factor to the computed height? This would make all notes a little (one line) taller, but would make the grid show the last line. Jim Frisby Dim rtb As New RichTextBox Private Sub GdbgWellNotes_DrawCellDisplayText(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridDrawCellDisplayTextEventArgs) Handles GdbgWellNotes.DrawCellDisplayText Dim gdbg1 As Syncfusion.Windows.Forms.Grid.GridDataBoundGrid gdbg1 = sender If (e.Style.CellIdentity.ColIndex = 4) Then ''//use for column 4 rtb.Clear() rtb.SelectedText = e.DisplayText Dim rtf As String = rtb.Rtf Syncfusion.Drawing.RichTextPaint.DrawRichText(e.Graphics, rtb, rtf, gdbg1.PrintingMode, gdbg1.GridBounds, e.TextRectangle, gdbg1.GridBounds, e.Style.BackColor, e.Style.WrapText, 100) e.Cancel = True End If End Sub

Administrator [Syncfusion]
Replied On August 2, 2004 04:29 PM UTC

You can explicitly set a row height using me.grid.Model.RowHeights(someRowIndex) = 40 So if you are trying to call grid.Model.RowHeights.ResizeToFit somewhere, you could then afterwards explicitly reset the height of some rows, but I do not know of a good way to decide what rows need to be resized and by how much.

James A Frisby(For EPS - Computer Software)
Replied On August 2, 2004 06:55 PM UTC

Thanks, that worked, seems like you only have to add 2 (whatevers) to the existing value to get it to consistently show the last line. Jim >You can explicitly set a row height using > >me.grid.Model.RowHeights(someRowIndex) = 40 > > >So if you are trying to call grid.Model.RowHeights.ResizeToFit somewhere, you could then afterwards explicitly reset the height of some rows, but I do not know of a good way to decide what rows need to be resized and by how much.

CONFIRMATION

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.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;