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

gridview visibility cell

1 Answer 65 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Max xu
Top achievements
Rank 1
Max xu asked on 26 Mar 2010, 02:33 AM
The gridview can't visible the gridviewcell correctly when I scorll the scorllViewer in gridview . 
 GridViewRow s = ((GridViewRow)RadGridView1.ItemContainerGenerator.ContainerFromIndex(0));  
            if (s != null)  
            {  
                 GridViewCellBase       j =  
                       (from c in s.Cells where c.Column.Name == "email" select c).FirstOrDefault();  
                 if (j != null)  
                 {  
                     j.Visibility = Visibility.Hidden;  
                 }  
            } 
the first pictrue is before scrolling,and the second one is after scrolling 

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 26 Mar 2010, 08:11 AM
Hi ,

You can do this in RowLoaded if you want to apply the same during scroll. You may need to turn off the grid columns virtualization since in case of many columns you will get the same problems however with horizontal scrolling. Generally the correct way for apply conditional cell style is demonstrated on this blog post.

Sincerely yours,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Max xu
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or