How to get the ItemsSource of DataGrid in Silverlight 3

3 posts, 1 answers
  1. Kiran
    Kiran avatar
    56 posts
    Member since:
    Dec 2008

    Posted 23 Jul 2010 Link to this post

    Hi,

    I am using WebAii 2.0 for automating Silverlight 3 application.

    I have a datagrid in which i have binded  an ObservableCollection of Student objects.
    So in my test can i get the ItemsSource from the datagrid and manipulate by any means in my test case.

    <data:DataGrid Name="StudentGrid" ItemsSource="{Binding StudentList}" >
     </data:DataGrid>


    Thanks
    Kiran
  2. Answer
    Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 23 Jul 2010 Link to this post

    Hello Kiran,

    No, unfortunately that is not possible currently. We have no way to expose the object the Silverlight control is bound to yet.

    So your goal is to test that custom objects, correct? I believe this goes to the scope of the Unit instead of the UI testing though. Have you considered cover that part of the test scenarios via unit tests?

    Kind regards,
    Konstantin Petkov
    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
  3. Kiran
    Kiran avatar
    56 posts
    Member since:
    Dec 2008

    Posted 23 Jul 2010 Link to this post

    Hi,

    Ok i got you. What i really wanted was that after lets say updating the properties of user. I wanted to verify whether all the properties are updated Correctly.

    The grid contains mininmum information only so i needed the collection.

    Thanks
    Kiran
Back to Top