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

[Solved] Null return for Cell retrieval

2 Answers 71 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.
Charles Nelson
Top achievements
Rank 1
Charles Nelson asked on 21 Sep 2010, 09:47 PM
 This code returns null when the column is not in view.  I thought that perhaps m_Column.DisplayIndex
was null but it is not.  Do you have any suggestions



 focusCell = (from g in gvRiskMetrics.ChildrenOfType<GridViewCell>()
                             where gvRiskMetrics.Columns.IndexOf(g.Column) == m_Column.DisplayIndex
                             select g).Skip(m_RowIndex).FirstOrDefault();

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 22 Sep 2010, 08:24 AM
Hi Charles Nelson,

In case that particular column has not been visible, its cells may not be created yet due to the virtualization. You may try to disable it by setting the EnableColumnVirtualization Property of the grid to "false". However, if you load a great amount of data, this may lead to slower performance.  
Otherwise, in order to provide you with a more appropriate solution, I would need a bit more information about your scenario and requirements.
 

Kind regards,
Maya
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
0
Charles Nelson
Top achievements
Rank 1
answered on 22 Sep 2010, 01:15 PM
I will try that and let you know.  I am not loading a lot of data. 

Charles.
Tags
GridView
Asked by
Charles Nelson
Top achievements
Rank 1
Answers by
Maya
Telerik team
Charles Nelson
Top achievements
Rank 1
Share this question
or