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

[Solved] issue with BringIndexIntoView

4 Answers 136 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.
Jim
Top achievements
Rank 1
Jim asked on 14 Dec 2009, 05:40 PM

The issue I am having is that the following code doesn't bring the particular indexed row into view.  The grid does scroll a fairly close but doesn't quite get it.  Perhaps I am doing something wrong.

The code I am executing is:

this.Users.Add( userInfo );
cGridView.SelectedItem
 = userInfo;                    
var index = cGridView.Items.IndexOf( userInfo );  
cGridView.BringIndexIntoView( index );  
 
Debug.WriteLine( "index: " + index.ToString() + " total: " + cGridView.Items.Count.ToString() ); 

The grid definition is:
 
<telerikGridView:RadGridView Name="cGridView"   
            Grid.Row="1" Margin="2,2,2,2" 
            ColumnsWidthMode="Fill"   
                        AutoGenerateColumns="False"   
                        RowDetailsVisibilityMode="VisibleWhenSelected"   
                        ShowGroupPanel="False" 
                        HorizontalAlignment="Stretch"    
                        RowIndicatorVisibility="Collapsed"

The grid does scroll. It just doesn't scroll far enough.
The output of my Debug.Writeline is Index: 34 total: 35

I have attempted a cGridView.Rebind() just after the add to the observable collection but this throws a null reference exception ( somewhere in GridView that I can't look at ).

I suspect this could be related to the fact that I have a details panel defined.

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 16 Dec 2009, 07:57 AM
Hi Jim,

 Can you post more info about your grid version? Do you have our latest service pack (Q3 SP1)?


All the best,
Vlad
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
Jim
Top achievements
Rank 1
answered on 16 Dec 2009, 01:33 PM
Hi Vlad -

telerik.windows.controls.gridview.dll - 2009.3.1103.1030

Best Regards - Jim

0
Milan
Telerik team
answered on 17 Dec 2009, 02:22 PM

Hello Jim,

You are using our previous version. Could you please try our latest service pack release. If you are still experiencing the same problem I would like to ask you to send us a sample project that will help us reproduce the issue.

Hope this helps.


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
Jim
Top achievements
Rank 1
answered on 17 Dec 2009, 09:55 PM
Milan - that was it! Thank you and sorry for not looking for a new version first :)

Best Regards and Warmest Christmas wishes

Jim
Tags
GridView
Asked by
Jim
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jim
Top achievements
Rank 1
Milan
Telerik team
Share this question
or