private DevExpress.XtraEditors.Filtering.FilterColumn getFilterColumn(DevExpress.XtraEditors.Filtering.FilterColumnCollection orgFilterColumns, string colName)
 {
     foreach (DevExpress.XtraEditors.Filtering.FilterColumn filterCol in orgFilterColumns)
     {
         if (string.Compare(filterCol.FieldName, colName, true) == 0)
         {
             return(filterCol);
         }
     }
     return(null);
 }
        private DevExpress.XtraEditors.Filtering.FilterColumnCollection createFilterColumn(IClientRuleQueryBase clientRuleObject, DevExpress.XtraEditors.Filtering.FilterColumnCollection orgFilterColumns)
        {
            var vals = clientRuleObject.UIRuleXmlConfigInfo.GetDefaultColumns();
            List <MB.WinBase.Common.ColumnPropertyInfo> cols = new List <MB.WinBase.Common.ColumnPropertyInfo>();

            cols.AddRange(vals.Values.ToArray());
            cols.Sort(new Comparison <MB.WinBase.Common.ColumnPropertyInfo>(colPropertyOrderByIndex));

            DevExpress.XtraEditors.Filtering.FilterColumnCollection filterColumns = new FilterColumnCollection();
            foreach (var colInfo in cols)
            {
                if (!colInfo.AdvanceFilter || !colInfo.Visibled)
                {
                    continue;
                }

                var fCol = getFilterColumn(orgFilterColumns, colInfo.Name);
                if (fCol == null)
                {
                    continue;
                }

                filterColumns.Add(fCol);
            }
            return(filterColumns);
        }