void ClearVariables()
 {
     focusedMasterKey   = null;
     focusedDetailKey   = null;
     focusedGroupValues = null;
     SelectionList.Clear();
     MasterRowList.Clear();
     GroupRowList.Clear();
 }
 void SaveExpandedMasterRows()
 {
     MasterRowList.Clear();
     for (int i = 0; i < gridControl.DataController.ListSourceRowCount; i++)
     {
         var rowHandle = gridControl.GetRowHandleByListIndex(i);
         if (gridControl.IsMasterRowExpanded(rowHandle))
         {
             MasterRowList.Add(GetKeyByRowHandle(rowHandle));
         }
     }
 }