Skip to main content

TreeListColumnEditorPropertiesFactory.BinaryImage(Action<MVCxColumnBinaryImageEditProperties>) Method

Allows you to configure a binary image column.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public void BinaryImage(
    Action<MVCxColumnBinaryImageEditProperties> method
)

Parameters

Name Type Description
method Action<MVCxColumnBinaryImageEditProperties>

A delegate method that accepts an MVCxColumnBinaryImageEditProperties object as a parameter.

Remarks

settings.Columns.Add(column => {
     column.FieldName = "Photo";
     column.EditorProperties().BinaryImage(p => {
          p.ImageHeight = 170;
          p.ImageWidth = 160;
          p.EnableServerResize = true;
          p.ImageSizeMode = ImageSizeMode.FitProportional;
          p.CallbackRouteValues = new { Action = "BinaryImageColumnPhotoUpdate", Controller = "Editing" };
          p.EditingSettings.Enabled = true;
          p.EditingSettings.UploadSettings.UploadValidationSettings.MaxFileSize = 4194304;
     });
});
See Also