Question

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()

No correct solution

OTHER TIPS

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()
    {
     //...
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top