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

Slow Scrolling in Grid

1 Answer 179 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 21 Sep 2009, 03:21 PM
Hello,
I need to apply some custom formatting to cells in my grid.  Based on the documentation, I have added code to the RowFormatting event of the grid.  This works fine as long as there are only a few rows in the grid.  Once a get a decent amount of data (60+ rows), then grid scrolls very slowly.  I have tried to set the EnableFastScrolling property to true, but the grid still has poor performance when scrolling with the keyboard (up/down keys).

My code in the RowFormatting event is very simple, so I'm surprised that it would cause the performance to degrade so severly.  Is there another way to handle this?  I tried applying formatting outside of the RowFormatting event, but the CellElement property of the cell is Nothing, so I can't access any of it's properties. 

    Private Sub rgvLines_RowFormatting(ByVal sender As ObjectByVal e As Telerik.WinControls.UI.RowFormattingEventArgs) Handles rgvLines.RowFormatting  
        Dim approval As String = Nothing 
 
        approval = e.RowElement.RowInfo.Cells("APPROVAL").Value.ToString()  
 
       If approval = "UNK" Then 
 
            e.RowElement.RowInfo.Cells("COMM").CellElement.Visibility = ElementVisibility.Hidden  
 
        End If 
 
    End Sub 


Thanks,
Sean

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 24 Sep 2009, 06:13 AM
Hi Sean,

Handling CellFormatting is the preferred way to change the visual appearance of cells in RadGridView. In fact, this is the only place where it is safe to access CellElement property. Using this event should not lead to performance issues, so I am confused. Please send me your application and I will try to figure out what is wrong.

I will be glad to help you further and I am looking forward to your reply.

Best wishes,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Sean
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or