문제

hello How do I enter devexpress mvc gridview static data?I do not want to use the model

Html.DevExpress().GridView(
settings =>
{ 
    settings.Columns.Add("BerthName", "Berth Name").Width = 10;
    setting.Columns.Insert.Item ????

    settings.ClientSideEvents.FocusedRowChanged = "OnGridFocusedRowChanged";


}).Bind(Model).GetHtml()

올바른 솔루션이 없습니다

다른 팁

You can bind to a static method

Html.DevExpress().GridView(
settings =>
{ 
    settings.Name = "dgrTest"; // you must have an name ( in general for all devexpress controls )
    //....
}).BindList(MyApp.NameSpace.StaticClass.MyStaticMethod()).GetHtml()

in your class

namespace MyApp.NameSpace
public static class StaticClass
{
    public static Model MyStaticMethod()
    {
     //...
    }
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top