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

ScrollIntoView bug

3 Answers 49 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 03 Dec 2009, 09:22 PM
if I use the ScrollIntoView method at some random point when resetting the ItemsSource I will get a null reference exception.  See attach screen shot.  I am using the latest internal build of q3.  It makes no difference if I use a generic List object or an

ObservableCollection as I've seen suggested to be used in another post.



This is my Code

Document 

 

currentRec = (Document)gvMainWorkQueue.SelectedItem;

 

 

 

 

gvMainWorkQueue.ItemsSource = Progressive.Document.

DataLayer.GetUnprocessedDocuments(userDepartment, userRole);

 

 

 

 

 

 

try

 

{

 

     

if (currentRec != null)

 

     {

         

for (int x = 0; x < gvMainWorkQueue.Items.Count; x++)

 

         {

             

if ((gvMainWorkQueue.Items[x] as Document).DocumentId == currentRec.DocumentId)

 

             {

                gvMainWorkQueue.SelectedItem = gvMainWorkQueue.Items[x];

                 

if (gvMainWorkQueue.SelectedItem != null)

 

                 {

                        gvMainWorkQueue.ScrollIntoView(gvMainWorkQueue.SelectedItem);

                 }

                 

break;

 

 

             }

        }

    }

 

}

 

catch (System.Exception ex)

 

 

{

 

}

 

 

 

3 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 09 Dec 2009, 02:22 PM
Hi Brian,

 

We were unable to reproduce the problem with the given information. Could you please send us a sample that we can use to simulate the exception? You could also try our latest build RadControls_for_Silverlight_2009_3_1127_Trial in case were referring to an older in your message.  

Thank yo for your cooperation.


All the best,
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
Kirill Prokopenko
Top achievements
Rank 1
answered on 19 Feb 2010, 03:08 PM
[Oh, sorry, it should be moved to Sivlerlight forum. I have that issue in Silverlight controls]

Hi, guys !

I think I have the same issue. I didn't have it when the grid was bound directly to an EntityCollection<> . But I had to change the logic in some reason and when I bound the grid to public property of IEnumerable<> type of some intermediate object, I got it. When adding a new entity, the grid would loose a focus so I wanted to select the newest entity and scroll to it's position. By the point of time of exception. a new item has already been inside grid items collection. Please see  image attached that shows an error.

The same error I get when trying to navigate to existing entities (for example when I delete a row and want to scroll to some other row).

Hoping for your help.
0
Vlad
Telerik team
answered on 19 Feb 2010, 03:20 PM
Hi,

Can you verify if you have our latest service pack - Q3 SP2?

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
Brian
Top achievements
Rank 1
Answers by
Milan
Telerik team
Kirill Prokopenko
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or