Esempio n. 1
0
		public PingGridColumn Add(string property,
		                          string caption,
		                          EditorBase editor)
		{
			var cell = new SourceGrid.Extensions.PingGrids.Cells.Cell();
			cell.Editor = editor;
	
			return Add(property, caption, cell);
		}
Esempio n. 2
0
        public PingGridColumn Add(string property,
                                  string caption,
                                  EditorBase editor)
        {
            var cell = new SourceGrid.Extensions.PingGrids.Cells.Cell();

            cell.Editor = editor;

            return(Add(property, caption, cell));
        }
Esempio n. 3
0
	        public static ICellVirtual Create(Type type, bool editable)
	        {
	            ICellVirtual cell;
	
	            if (type == typeof(bool))
	                cell = new SourceGrid.Extensions.PingGrids.Cells.CheckBox();
	            else
	            {
	                cell = new SourceGrid.Extensions.PingGrids.Cells.Cell();
	                cell.Editor = SourceGrid.Cells.Editors.Factory.Create(type);
	            }
	
	            if (cell.Editor != null) //Can be null for special DataType like Object
	            {
	                //The columns now support always DbNull values because the validation is done at row level by the DataTable itself.
	                cell.Editor.AllowNull = true;
	                cell.Editor.EnableEdit = editable;
	            }
	
	            return cell;
	        }
Esempio n. 4
0
        public static ICellVirtual Create(Type type, bool editable)
        {
            ICellVirtual cell;

            if (type == typeof(bool))
            {
                cell = new SourceGrid.Extensions.PingGrids.Cells.CheckBox();
            }
            else
            {
                cell        = new SourceGrid.Extensions.PingGrids.Cells.Cell();
                cell.Editor = SourceGrid.Cells.Editors.Factory.Create(type);
            }

            if (cell.Editor != null)         //Can be null for special DataType like Object
            {
                //The columns now support always DbNull values because the validation is done at row level by the DataTable itself.
                cell.Editor.AllowNull  = true;
                cell.Editor.EnableEdit = editable;
            }

            return(cell);
        }
 /// <summary>
 /// Constructor. Create a DataGridColumn class.
 /// </summary>
 /// <param name="grid"></param>
 public PingGridColumn(PingGrid grid)
     : base(grid)
 {
     mHeaderCell = new SourceGrid.Extensions.PingGrids.Cells.ColumnHeader(string.Empty);
     mDataCell   = new SourceGrid.Extensions.PingGrids.Cells.Cell();
 }
Esempio n. 6
0
		/// <summary>
		/// Constructor. Create a DataGridColumn class.
		/// </summary>
		/// <param name="grid"></param>
		public PingGridColumn(PingGrid grid)
			: base(grid)
		{
			mHeaderCell = new SourceGrid.Extensions.PingGrids.Cells.ColumnHeader(string.Empty);
			mDataCell = new SourceGrid.Extensions.PingGrids.Cells.Cell();
		}