DotNetBar之SupergridControl显示图片,行距自动调整

DotNetBar第三方控件SupergridControl中显示图片

 

1、设置SuperGridControl:

SuperGridControl的GridColumn的EditorType设置为:GridImageEditControl

2、将数据List<T>的相应字段填充值,使用ImageToByte.Byte_Image()字节转换图片的方法:

List<AddModel.Add_GoodsInfoModel> AddGoodsInfo = new List<AddModel.Add_GoodsInfoModel>();

AddModel.Add_GoodsInfoModel AddGoodsInfoModel = new AddModel.Add_GoodsInfoModel();

AddGoodsInfoModel.商品图片 = ImageToByte.Byte_Image(GPIService.QueryByPictureId(GoodsList[count].PrctureId.Value).PictureValue);

3、绑定数据:               

sup_goods.PrimaryGrid.DataSource = AddGoodsInfo;

4、行距自动调整:

sup_goods.PrimaryGrid.DefaultRowHeight = 0;

你可能感兴趣的:(super)