0
私はGijgoグリッドを使ってテーブルのデータを管理しています。Gijgo Gridで異なる背景色をdinamicallyに設定するにはどうすればいいですか?
異なる行の背景色を設定したいと思います。色はモデルにあります。
ビュー
grid = $("#grid").grid({
dataSource: { url: '@Url.Action("Method", "MyController")', success: onSuccessFunc },
dataKey: "Id",
uiLibrary: "bootstrap",
columns:
[
{ field: "Id", sortable: false, hidden: true },
{ field: "Name", sortable: false, hidden: true },
{ field: "Description", title: "Tipologia", sortable: false, width: "70%" },
{ field: "Value1", title: "Value 1", align: 'center', sortable: false },
{ field: "Value2", title: "Value 2", align: 'center', sortable: false },
{ field: "Edit", title: "", width: 34, type: "icon", icon: "glyphicon-pencil", tooltip: "Edit", events: { "click": Edit } }
]
});
のViewModel
public class ViewModel
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public double? Value1 { get; set; }
public double? Value2 { get; set; }
public string Group { get; set; }
public string BackGroudColor { get; set; }
}
は、どのように私はモデルのプロパティをbackgroundColorのために、グリッドの列のプロパティの背景色をバインドすることができますか?
ありがとうございました。
チャールズ
グレートアタナス...ありがとう – Charles