你好如何输入devexpress mvc gridview静态数据?我不想使用该模型
Html.DevExpress().GridView(
settings =>
{
settings.Columns.Add("BerthName", "Berth Name").Width = 10;
setting.Columns.Insert.Item ????
settings.ClientSideEvents.FocusedRowChanged = "OnGridFocusedRowChanged";
}).Bind(Model).GetHtml()
答案 0 :(得分:0)
您可以绑定到静态方法
Html.DevExpress().GridView(
settings =>
{
settings.Name = "dgrTest"; // you must have an name ( in general for all devexpress controls )
//....
}).BindList(MyApp.NameSpace.StaticClass.MyStaticMethod()).GetHtml()
你班上的
namespace MyApp.NameSpace
public static class StaticClass
{
public static Model MyStaticMethod()
{
//...
}
}