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

[Solved] Not all the cells available in e.Row.Cells of RowLoaded event

8 Answers 277 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Frank
Top achievements
Rank 1
Frank asked on 19 Nov 2009, 04:00 PM

Hello,
Is there a specific reason why in Q3 GridView in the
RowLoaded (ByVal sender As System.Object, ByVal e As Telerik.Windows.Controls.GridView.RowLoadedEventArgs)
event the e.Row.Cells collection  contains  only the cells for the columns which are currently visible.
We need to be able to access all the cells of the row when it initially loads to apply formatting  depending on the values in the cells.
This was possible  with the Q2 GridView.

Is there also a reason why this event now starts firing  every time the column  becomes visible while scrolling horizontally? 

This is not consistent with  Q2 GridView where the e.Row.Cells collection contained all the cells of the row and the rowloaded event was executed only when the row becomes visible while scrolling vertically but not horizontally.

8 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 19 Nov 2009, 04:09 PM
Hi Frank,

With Q3 we introduced a brand new horizontal virtualization mechanism which creates only the currently visible cells. You could turn off that behavior by setting the EnableColumnVirtualization to false - by doing that you will disable the horizontal virtualization and all cells will be available.


Greetings,
Milan
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.
0
Frank
Top achievements
Rank 1
answered on 19 Nov 2009, 07:42 PM
Thank you for the quick reply Milan. It works great.
Unfortunately we ran into another issue with row virtualization.
In the rowloaded event we assign different contenttemplates to the cells base on the values in them.
Now with ColumnVirtualization set to false everything works fine when the grid initially loads and when  the grid is scrolled down.
But when the grid is scrolled back up it seems that the cell ContentTemplates from the rows previously displayed on the screen are present in the cells of  the rows in the new scroll position.
Setting the  EnableRowVirtualization  to false eliminates this issue.
But we would really like to use RowVirtualization  feature  to increase the performance of the grid
0
Dhileep Kumar Sampath
Top achievements
Rank 1
answered on 20 Nov 2009, 12:11 PM
Hi Frank & Telerik Team,
   We are facing the same issue. Till Q2, we were accessing the each cell of the row in the RowLoaded event and formating the data accordingly. But now with Q3 there are no cells available and I tried setting the EnableColumnVirtualization and EnableRowVirtaulization  to false in the RadGridView properties but it is not working for me. There are no cells available in the Row. Can you pls suggest me what i am missing here.

Thanks,
Dhileep
0
Dhileep Kumar Sampath
Top achievements
Rank 1
answered on 20 Nov 2009, 02:34 PM
Hi All,
     The problem is because of beta dll we were using and once i changed it to the release version it worked fine.

Thanks,.
Dhileep

0
Milan
Telerik team
answered on 24 Nov 2009, 03:16 PM
Hello Frank,

You could try setting the ContentTemplate property to null before applying the correct cell template in RowLoaded.


Best wishes,
Milan
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.
0
Frank
Top achievements
Rank 1
answered on 27 Nov 2009, 08:09 PM

 This doesn't work for us. Setting the cell content template to null seems to erase the Bindings which were set  on columns before the grid was bound to data source.
I guess we will stay with the row virtualization set to false.
Thank you.

0
Frank
Top achievements
Rank 1
answered on 27 Nov 2009, 09:18 PM
Here is another issue.
 In our scenario the user can filter out some columns which they don't want to see on the grid.
When this is done the isVisible property of the appropriate GridViewDataColumn is set to false.
Everything worked as expected in Q2.
Now in Q3 even with the EnableColumnVirtualization and the EnableRowVirtualization set to false
all the formatting which was applied to the cells of the columns which become hidden is shifted to the visible columns.
Is there any way this can be avoided?
Thank you.
0
Milan
Telerik team
answered on 03 Dec 2009, 09:18 AM

Hello Frank,

Unfortunately I was not able to reproduce the problem with column visibility. I am sending you my test project. Maybe I am not following your scenario.

You could also try to hide columns by setting their size to 0 instead of setting the IsVisible property.


Regards,
Milan
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
Frank
Top achievements
Rank 1
Answers by
Milan
Telerik team
Frank
Top achievements
Rank 1
Dhileep Kumar Sampath
Top achievements
Rank 1
Share this question
or