Completed
Last Updated: 10 Sep 2015 06:02 by ADMIN
ADMIN
Hristo
Created on: 07 Jul 2015 06:16
Category: GridView
Type: Bug Report
1
FIX. RadGridView - some rows are not printed when the row height is set to a value less than the default one
How to reproduce:
Public Class Form1
    Sub New()

        InitializeComponent()

        Dim dataTable As New DataTable
        dataTable.Columns.Add("Id", GetType(Integer))
        dataTable.Columns.Add("Name", GetType(String))
        dataTable.Columns.Add("IsValid", GetType(Boolean))

        For i As Integer = 0 To 40
            dataTable.Rows.Add(i, "Name " & i, i Mod 2 = 0)
        Next

        Me.RadGridView1.DataSource = dataTable
        Me.RadGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill
        Me.RadGridView1.TableElement.RowHeight = 20
    End Sub

    Private Sub btnPrint_Click(sender As Object, e As EventArgs) Handles btnPrint.Click
        Me.RadGridView1.PrintPreview()
    End Sub

End Class

Workaround: before printing increase the row height or set RadGridView.AutoSizeRows = True
Private Sub btnPrint_Click(sender As Object, e As EventArgs) Handles btnPrint.Click
    'Me.RadGridView1.TableElement.RowHeight = 24
    Me.RadGridView1.AutoSizeRows = True
    Me.RadGridView1.PrintPreview()
End Sub

(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments