How to click the Drill down

5 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 silverlight 3 automation.

    I need to click the Plus(+) sign in the RadGridView. Please see the attached image for reference.
    Actually what is that Plus(+) sign control. Is it an image or anything else?

    Is it possible through Translator? Any way i want the other way.

    Thanks
    Kiran
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 23 Jul 2010 Link to this post

    Hello Kiran,

    RadGridView peer has Rows property gives access to all rows displayed by the grid. All rows have Expande/Collapse method which will expand or collapse the respective row if this row is a hierarchy one.


    Greetings,
    Milan
    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 Milan,

    Thanks for your quick reply.
    The code you provided is working.

    But i need to find that element and click. I tried below buts its not working.
    I need to know what is that Plus sign. Is it a TextBlock or Image or anyother control so that i can get that through Find.
    FrameworkElement grid = base.Find.AllByType("RadGridView").FirstOrDefault(s => s.Name == "ProjectDocketsGrid");
                grid.Refresh();
                IList<FrameworkElement> rows = grid.Find.AllByType("GridViewRow");
      
                IList<TextBlock> textBlocks = grid.Find.AllByText("+");
                textBlocks = rows.FirstOrDefault().Find.AllByText("+");

    Thanks
    Kiran
  4. Answer
    Missing user
    Missing user avatar

    Posted 26 Jul 2010 Link to this post

    Hello Kiran,

    You can try something like:

    IList <GridViewRow> l = ActiveBrowser.SilverlightApps()[0].Find.AllByType<GridViewRow>();
    l[2].Cells[0].User.Click(MouseClickType.LeftClick);

    Hope that helps.

    Greetings,
    Nelson Sin
    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
  5. Kiran
    Kiran avatar
    56 posts
    Member since:
    Dec 2008

    Posted 27 Jul 2010 Link to this post

    Hi Nelson,

    Wowww.... It's a great solution. It may help me in many other places too.
    Also i have identified what is that control after spending some time. Its actually GridViewToggleButton
    We can do that in below way also

     

    FrameworkElement toggleButton= ProjectDocketsGrid.Rows[projectDocketsGridRowNumber].Find.ByType("GridViewToggleButton");

     

    toggleButton.User.Click();

     



    Thanks
    Kiran
Back to Top