Example #1
0
 public ColumnDisplayModel(string header, string name, ControlKind kind, ControlKind gridPreviewKind, ColumnType type, WidthHint requestedWidth, int? requestedWidthAbsolute)
 {
     this.Header = header;
     this.Name = name;
     this.ControlKind = kind;
     this.GridPreEditKind = gridPreviewKind ?? kind;
     this.Type = type;
     this.RequestedWidth = requestedWidth;
     this.RequestedWidthAbsolute = requestedWidthAbsolute;
 }
Example #2
0
 /// <summary>
 /// Creates a ColumnDisplayModel for a view model property or path to a property
 /// </summary>
 /// <param name="header">Label for the list header</param>
 /// <param name="kind">The requested editor kind or null if default should be used</param>
 /// <param name="gridPreviewKind">The requested preview kind or null if default should be used</param>
 /// <param name="requestedWidth">Requested list column width</param>
 /// <param name="requestedWidthAbsolute">Requested list column width in absolute toolkit units</param>
 /// <param name="vmPropPath">Path to the viewmodels property</param>
 /// <returns>a ready configurated ColumnDisplayModel</returns>
 public static ColumnDisplayModel Create(string header, ControlKind kind, ControlKind gridPreviewKind, WidthHint requestedWidth, int? requestedWidthAbsolute, string vmPropPath)
 {
     return new ColumnDisplayModel()
     {
         Header = header,
         Path = vmPropPath,
         Type = ColumnDisplayModel.ColumnType.ViewModelProperty,
         RequestedWidth = requestedWidth,
         RequestedWidthAbsolute = requestedWidthAbsolute,
         ControlKind = kind,
         GridPreEditKind = gridPreviewKind ?? kind,
     };
 }
Example #3
0
 /// <summary>
 /// Creates a ColumnDisplayModel for a view model property or path to a property
 /// </summary>
 /// <param name="header">Label for the list header</param>
 /// <param name="kind">The requested editor kind or null if default should be used</param>
 /// <param name="requestedWidth">Requested list column width</param>
 /// <param name="vmPropPath">Path to the viewmodels property</param>
 /// <returns>a ready configurated ColumnDisplayModel</returns>
 public static ColumnDisplayModel Create(string header, ControlKind kind, WidthHint requestedWidth, string vmPropPath)
 {
     return Create(header, kind, null, requestedWidth, null, vmPropPath);
 }
Example #4
0
 /// <summary>
 /// Creates a ColumnDisplayModel for a zetbox object method
 /// </summary>
 /// <param name="requestedWidth">Requested list column width</param>
 /// <param name="m">method to build column for</param>
 /// <returns>a ready configurated ColumnDisplayModel</returns>
 public static ColumnDisplayModel Create(WidthHint requestedWidth, Method m)
 {
     var colMdl = Create(m);
     colMdl.RequestedWidth = requestedWidth;
     return colMdl;
 }
Example #5
0
 /// <summary>
 /// Creates a ColumnDisplayModel for a zetbox object method
 /// </summary>
 /// <param name="header">Label for the list header</param>
 /// <param name="requestedWidth">Requested list column width</param>
 /// <param name="m">method to build column for</param>
 /// <returns>a ready configurated ColumnDisplayModel</returns>
 public static ColumnDisplayModel Create(string header, WidthHint requestedWidth, Method m)
 {
     var colMdl = Create(m);
     colMdl.Header = header;
     colMdl.RequestedWidth = requestedWidth;
     return colMdl;
 }
Example #6
0
 /// <summary>
 /// Creates a ColumnDisplayModel for a zetbox object property or property path
 /// </summary>
 /// <param name="mode">Requested mode (readonly, editable)</param>
 /// <param name="header">Label for the list header</param>
 /// <param name="kind">The requested editor kind or null if default should be used</param>
 /// <param name="gridPreviewKind">The requested preview kind or null if default should be used</param>
 /// <param name="requestedWidth">Requested list column width</param>
 /// <param name="requestedWidthAbsolute">Requested list column width in absolute toolkit units</param>
 /// <param name="p">list of properties to build column for</param>
 /// <returns>a ready configurated ColumnDisplayModel</returns>
 public static ColumnDisplayModel Create(GridDisplayConfiguration.Mode mode, string header, ControlKind kind, ControlKind gridPreviewKind, WidthHint requestedWidth, int? requestedWidthAbsolute, params Property[] p)
 {
     var colMdl = Create(mode, p);
     colMdl.Header = header;
     colMdl.ControlKind = kind;
     colMdl.GridPreEditKind = gridPreviewKind ?? kind;
     colMdl.RequestedWidth = requestedWidth;
     colMdl.RequestedWidthAbsolute = requestedWidthAbsolute;
     return colMdl;
 }
Example #7
0
 /// <summary>
 /// Creates a ColumnDisplayModel for a zetbox object property or property path
 /// </summary>
 /// <param name="mode">Requested mode (readonly, editable)</param>
 /// <param name="header">Label for the list header</param>
 /// <param name="requestedWidth">Requested list column width</param>
 /// <param name="p">list of properties to build column for</param>
 /// <returns>a ready configurated ColumnDisplayModel</returns>
 public static ColumnDisplayModel Create(GridDisplayConfiguration.Mode mode, string header, WidthHint requestedWidth, params Property[] p)
 {
     var colMdl = Create(mode, p);
     colMdl.Header = header;
     colMdl.RequestedWidth = requestedWidth;
     return colMdl;
 }
Example #8
0
 public ColumnDisplayModel(string header, string name, ControlKind kind, WidthHint requestedWidth)
     : this(header, name, kind, null, ColumnType.PropertyModel, requestedWidth, null)
 {
 }