Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

  • GearWorld

    GearWorld

    Participant

    1788 Points

    2080 Posts

    Select a row in DataGrid

    Nov 26, 2008 05:42 PM | LINK

    When I use the DataGrid ScrollView it does what it does but I'm unable to scroll to the end to see the last row of the DataGrid. 
    Is it a BUG or its me not knowing how to do that ?

     
    dgWorkedOn.SelectedIndex = dgWorkedOn.ItemsSource.OfType(ProxyCode.ProjectWorkedOn).ToList().Count - 1;
    dgWorkedOn.ScrollIntoView(dgWorkedOn.SelectedItem, dgWorkedOn.Columns[0]);
    
     
    I get INVALID ROW INDEX

    I've debugged and the SelectedIndex is right and the SelectedItem is right so what is not right on this to get the errur above ?