Kendo Grid

2 posts, 0 answers
  1. Chaitanya
    Chaitanya avatar
    1 posts
    Member since:
    Jun 2012

    Posted 26 Jun 2012 Link to this post

    Hi,

    I have to automate an application which is developed using kendo controls. I want to access kendo grid control.
    Can you provide a sample code for accessing kendo grid.


    Thanks in advance,
    Chaitanya.
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 26 Jun 2012 Link to this post

    Hi Chaitanya,

    Here's a sample code created against this Kendo Grid demo site. The code demonstrates how to find and delete a row in Kendo Grid.  
     
    //Get the grid object
    KendoGrid grid = ActiveBrowser.Find.ById<KendoGrid>("grid");
     
     
    //Search for a row that contains "Chang" in its first cell
    foreach (KendoGridDataItem row in grid.DataItems)
    {
        if (row.Cells[0].TextContent == "Chang")
        {
            //Create a Confirm dialog
            ConfirmDialog cd = new ConfirmDialog(ActiveBrowser, DialogButton.OK);
            Manager.DialogMonitor.AddDialog(cd);
            Manager.DialogMonitor.Start();
     
            //Click on the last cell to delete the row
            row.Cells[3].MouseClick();
     
            //Handle the Confirm dialog
            cd.WaitUntilHandled();
            Manager.DialogMonitor.RemoveDialog(cd);
        }
    }

    If you need further assistance on this please let me know.

    All the best,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top