コード例 #1
0
ファイル: AddEditUsers.aspx.cs プロジェクト: zgying/CRMWeiXin
 protected void RadGrid1_ColumnCreating(object sender, GridColumnCreatingEventArgs e)
 {
     if ((e.ColumnType == typeof(BLL.CustomFilteringColumn).Name))
     {
         e.Column = new BLL.CustomFilteringColumn();
     }
 }
コード例 #2
0
 private void IndCatGrid_ColumnCreating(object sender, GridColumnCreatingEventArgs e)
 {
     try
     {
         if (e.Column == null && e.ColumnType == "IndGridBoundColumn")
         {
             e.Column = new IndGridBoundColumn();
         }
         if (e.Column == null && e.ColumnType == "IndBoolGridBoundColumn")
         {
             e.Column = new IndBoolGridBoundColumn();
         }
         if (e.Column == null && e.ColumnType == "IndGridTemplateColumn")
         {
             e.Column = new IndGridTemplateColumn();
         }
         if (e.Column == null && e.ColumnType == "IndGridDeleteColumn")
         {
             e.Column = new IndGridDeleteColumn();
             ((GridTemplateColumn)e.Column).AllowFiltering = true;
             e.Column.Resizable         = false;
             e.Column.HeaderStyle.Width = Unit.Pixel(25);
         }
         if (e.Column == null && e.ColumnType == "IndGridEditColumn")
         {
             e.Column = new IndGridEditColumn();
             ((IndGridEditColumn)e.Column).AllowFiltering = true;
             e.Column.Resizable         = false;
             e.Column.HeaderStyle.Width = Unit.Pixel(25);
         }
         e.Column.Resizable = false;
     }
     catch (IndException ex)
     {
         ControlHierarchyManager.ReportError(ex);
         return;
     }
     catch (Exception ex)
     {
         ControlHierarchyManager.ReportError(new IndException(ex));
         return;
     }
 }