/// <summary>
        /// Check on checkbox for a course by looking up course Id in the choose course section
        /// </summary>
        public void SelectChooseCourseByRow()
        {
            int rowIndex = Data.RowNumber;

            if (rowIndex > 0)
            {
                EditAssignmentCourseRow row = (EditAssignmentCourseRow)ChooseCourseGrid.GetRowFromList(rowIndex);
                row.Check();
            }
        }
 /// <summary>
 /// gets a list of rows containing the text to find from the row list
 /// </summary>
 /// <param name="columnName">the column name</param>
 /// <param name="textToFind">the text to find</param>
 /// <returns>list of GridRow</returns>
 public new List <EditAssignmentCourseRow> GetsRowsContainingTextToFindFromList(string columnName, string textToFind)
 {
     if (RowList.Count == 0)
     {
         Assert.Fail("No items were found in the search results column list.");
         return(null);
     }
     else
     {
         List <EditAssignmentCourseRow> rowList = new List <EditAssignmentCourseRow>();
         string text  = null;
         int    index = 0;
         foreach (var row in RowList)
         {
             if (row.Type == GridRowType.Data)
             {
                 EditAssignmentCourseRow EditAssignmentCourseRow = (EditAssignmentCourseRow)row;
                 //get the text by column name
                 if (columnName.Equals(EditAssignmentCourseColumnNames.CourseName))
                 {
                     text = EditAssignmentCourseRow.GetCourseName();
                     //Debug.WriteLine("martin actual text: " + text);
                     //Debug.WriteLine("martin expected text to find: " + textToFind);
                 }
                 if (columnName.Equals(EditAssignmentCourseColumnNames.CourseId))
                 {
                     text = EditAssignmentCourseRow.GetCourseId();
                     //Debug.WriteLine("martin actual text: " + text);
                     //Debug.WriteLine("martin expected text to find: " + textToFind);
                 }
                 if (columnName.Equals(EditAssignmentCourseColumnNames.NumberOfCourse))
                 {
                     text = EditAssignmentCourseRow.GetNumberOfCourse();
                     //Debug.WriteLine("martin actual text: " + text);
                     //Debug.WriteLine("martin expected text to find: " + textToFind);
                 }
                 //if the text is not null
                 if (text != null)
                 {
                     //if the text contains the text to find
                     if (text.Contains(textToFind))
                     {
                         rowList.Add(EditAssignmentCourseRow);
                     }
                 }
             }
         }
         //may return empty row list if text is not found
         return(rowList);
     }
 }
        /// <summary>
        /// Sets the Columns List
        /// </summary>
        public override void SetRowLists()
        {
            base.SetRowLists();
            int rowIndex = 0;

            foreach (var webElement in WebElementRows)
            {
                Report.Write("GridRow by index: " + rowIndex);
                GridRowType rowType = GetGridRowType(rowIndex);
                Report.Write("GridRowType: " + rowType);
                var lineItem = new EditAssignmentCourseRow(gridCssSelector, webElement, rowIndex, rowType, ColumnList, ControlPrefix);
                RowList.Add(lineItem);
                rowIndex++;
            }
        }