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

display issues with grid.

10 Answers 162 Views
GridView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 17 Dec 2010, 04:17 PM
On a griview that I am dynamically binding, I have the autosizerows property set to true.  The grid display fine for the current rows but when I scroll to the bottom, the grid lines do not display correctly as there are lines within the rows (seems like a refresh issue)....of the grid.  Not sure how I can send you an image of the same.  Can you suggest what I can do to fix the same.

10 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 17 Dec 2010, 04:41 PM
Hi Johm,

I've not been able to replicate your issue using the latest 2010 Q3 SP1 controls.
Can you confirm that you are also using the latest version. If not, then I'd suggest upgrading as there are numerous fixes to RadGridView, including scrolling issues (see release notes here)

if you are using the latest, if you could post a replicable sample, i'll be happy to take a look at it for you
thanks
Richard
0
John
Top achievements
Rank 1
answered on 17 Dec 2010, 05:30 PM
Hi Richard!

I downloaded a version just yesterday so it is the latest version. 

code is as below...  If you can send me your email address, I can send you a screen capture.


RadTracts.MasterTemplate.AutoGenerateColumns =

True

 

RadTracts.AllowDeleteRow =

False

 

RadTracts.AllowEditRow =

False

 

RadTracts.AllowAddNewRow =

False

 

RadTracts.AllowColumnResize =

True

 

RadTracts.AutoSizeRows =

True

 

 

 

RadTracts.DataSource = objTracts.getTractList(intUserID,

False, True, True)

 

RadTracts.MasterTemplate.AllowColumnChooser =

False

 

RadTracts.Columns(0).IsVisible =

False

 

RadTracts.Columns(3).IsVisible =

False

 

RadTracts.Columns(4).IsVisible =

False

 

RadTracts.Columns(1).Width = 100

RadTracts.Columns(2).Width = RadTracts.Width - 150

 

RadTracts.Columns(2).DisableHTMLRendering =

False

 

 

 

 

 

RadTracts.Refresh()


0
Richard Slade
Top achievements
Rank 2
answered on 17 Dec 2010, 05:43 PM
Hello John,

I see that you are using HTML content in one of your columns as you have DisableHTMLrendering = false.
Are you able to send me a datasource too (formatted with the code block above in the reply). Even if this is a method that returns a binding list or similar to make sure I am working with the similarities in data that you are too.

Thanks
Richard
0
Richard Slade
Top achievements
Rank 2
answered on 17 Dec 2010, 05:44 PM
P.S - For screenshots and video that you can share with anyone via a URL, I'd suggest downloading a free copy of Jing
Richard
0
John
Top achievements
Rank 1
answered on 17 Dec 2010, 05:51 PM
Hi Richard!

The data has some sensative info so I cannot post on Jing or send you the same on the web site.  If you could send me your email, I can send you more info.
0
Richard Slade
Top achievements
Rank 2
answered on 17 Dec 2010, 05:54 PM
Hi John,

Thanks for writing.
It would be best to keep all posts on the forum so others that experience the same issue can track the solution where possible. The data doesn't have to be your real data. Just a method that returns some dummy values that match the style of what you are trying to output.

look forward to hearing back from you
Richard
0
John
Top achievements
Rank 1
answered on 17 Dec 2010, 06:33 PM
Here is some sample data from 3 rows of the the HTML column.  the other columns have ID type int values.  Let me know if this helps.

<html> Customer type: <strong>Private Company</strong><BR/>Status:


<html> Customer Type: <strong>Non Profit Org</strong><BR/>Name: <strong>First Party</strong><BR/>Status:

<html> Customer type: <strong>Private Company</strong><BR/>Name: <strong>First Contact</strong><BR/>Status:


0
John
Top achievements
Rank 1
answered on 17 Dec 2010, 06:41 PM
Hi Richard!

One option would be to set the default rowheight of all rows to the higher value.  Not sure how to do that so your help on how to set the rowheight for all rows would be helpful.
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 17 Dec 2010, 10:56 PM
Hi John,

the problem come from the auto size rows. It would be best in this case to turn it off, and set a row height manually. I've produced a sample based on the things you've told me and you can also find a small video that shows it being replicated and fixed by setting a row height at this link

Code
Imports Telerik.WinControls
Imports Telerik.WinControls.UI
Imports Telerik.WinControls.Data
Imports System.ComponentModel
  
  
Public Class Form1
  
    Private Sub Form1_Load(ByVal sender As System.Object,
                           ByVal e As System.EventArgs) Handles MyBase.Load
  
  
        RadTracts.MasterTemplate.AutoGenerateColumns = True
        RadTracts.AllowDeleteRow = False
        RadTracts.AllowEditRow = False
        RadTracts.AllowAddNewRow = False
        RadTracts.AllowColumnResize = False
        RadTracts.AutoSizeRows = False
        RadTracts.DataSource = GetTrackList()
        RadTracts.MasterTemplate.AllowColumnChooser = False
        RadTracts.Columns(0).IsVisible = False
        RadTracts.Columns(3).IsVisible = False
        RadTracts.Columns(4).IsVisible = False
        RadTracts.Columns(1).Width = 100
        RadTracts.Columns(2).Width = RadTracts.Width - 150
        RadTracts.Columns(2).DisableHTMLRendering = False
  
        RadTracts.TableElement.RowHeight = 55
    End Sub
  
    Private Function GetTrackList() As BindingList(Of Track)
        Dim bindingList As New BindingList(Of Track)
        For i As Integer = 0 To 100
            bindingList.Add(New Track(i, i + 5, "<html> Customer type: <strong>Private Company</strong><br>Name: <strong>First Contact</strong><br>Status:</html>", i + 10, i + 15))
        Next
        Return bindingList
    End Function
  
    Private Sub RadTracts_RowFormatting(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.RowFormattingEventArgs) Handles RadTracts.RowFormatting
  
    End Sub
End Class
  
  
Public Class Track
    Private m_Id0 As Integer
    Private m_Id1 As Integer
    Private m_HTML As String
    Private m_Id3 As Integer
    Private m_Id4 As Integer
  
  
    Public Sub New()
    End Sub
  
    Public Sub New(ByVal id0 As Integer, ByVal id1 As Integer, ByVal html As String, ByVal id3 As Integer, ByVal id4 As Integer)
        m_Id0 = id0
        m_Id1 = id1
        m_HTML = html
        m_Id3 = id3
        m_Id4 = id4
    End Sub
  
    Public Property Id0() As Integer
        Get
            Return m_Id0
        End Get
        Set(ByVal value As Integer)
            m_Id0 = value
        End Set
    End Property
  
    Public Property Id1() As Integer
        Get
            Return m_Id1
        End Get
        Set(ByVal value As Integer)
            m_Id1 = value
        End Set
    End Property
  
    Public Property HTML() As String
        Get
            Return m_HTML
        End Get
        Set(ByVal value As String)
            m_HTML = value
        End Set
    End Property
  
    Public Property Id3() As Integer
        Get
            Return m_Id3
        End Get
        Set(ByVal value As Integer)
            m_Id3 = value
        End Set
    End Property
  
    Public Property Id4() As Integer
        Get
            Return m_Id4
        End Get
        Set(ByVal value As Integer)
            m_Id4 = value
        End Set
    End Property
  
  
End Class

Hope that helps, but let me know if you need more information.

//PS - Ive edited your HTML slightly as it doesnt conform to the HTML like formatting standards given in this documentation

All the best
Richard
0
Richard Slade
Top achievements
Rank 2
answered on 20 Dec 2010, 01:51 PM
Hello John,

did this help? If so please remember to mark as answer
Thanks
Richard
Tags
GridView
Asked by
John
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
John
Top achievements
Rank 1
Share this question
or