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

GridRowElement not set ?

2 Answers 76 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Louis
Top achievements
Rank 1
Louis asked on 03 Oct 2007, 06:20 PM
I have a function that formats rows in the grid. For example the rows that have been modified are put to bold, etc. When i call this function i sometimes get an exception stating that VisualElement is null??

Is it ok to manipulate the visual style of a row with this property and if not ... how to format row ?

ps: the format condition is not good for me so please another way...

2 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 04 Oct 2007, 03:52 PM
Hi Louis ,

RadGridView uses virtualization of its visual elements. This means that only a limited number of elements are created at a time. Only the rows that are currently visible on grid's surface have an associated VisualElement. When the grid is sorted or just scrolled up and down, these elements are reused and connected with new row info. Yes, it is OK to use the VisualElement property of GridViewRowInfo to format it, but this must happen inside RowFormatting or CellFormatting events.
 

All the best,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Louis
Top achievements
Rank 1
answered on 05 Oct 2007, 05:41 PM
ah !! ok i understand now!
thanks
Tags
GridView
Asked by
Louis
Top achievements
Rank 1
Answers by
Jack
Telerik team
Louis
Top achievements
Rank 1
Share this question
or