/// <summary>
        /// Добавить сортировку
        /// </summary>
        /// <param name="csd">Сортировка</param>
        public void AddColumnSort(ColumnsSortDef csd)
        {
            if (fieldColumnsSort == null)
            {
                fieldColumnsSort = new ColumnsSortDef[0];
            }

            int newsize = fieldColumnsSort.Length + 1;

            Array.Resize(ref fieldColumnsSort, newsize);
            fieldColumnsSort[newsize - 1] = csd;
        }
 public ColumnsSortDef[] GetColumnsSortDef(string ReferenceName)
 {
     if (ColumnsSort == null || ColumnsSort.Length == 0)
     {
         return(null);
     }
     else
     {
         ReferenceName = ReferenceName + ".";
         System.Collections.ArrayList al = new System.Collections.ArrayList();
         foreach (ColumnsSortDef csd in ColumnsSort)
         {
             if (csd.Name.StartsWith(ReferenceName))
             {
                 ColumnsSortDef cs = csd;
                 cs.Name = csd.Name.Substring(ReferenceName.Length);
                 al.Add(cs);
             }
         }
         return((ColumnsSortDef[])al.ToArray(typeof(ColumnsSortDef)));
     }
 }