【问题标题】:devexpress mvc gridview static insert itemdevexpress mvc gridview 静态插入项
【发布时间】:2014-03-01 11:10:28
【问题描述】:

你好我如何输入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()

【问题讨论】:

    标签: jquery devexpress


    【解决方案1】:

    您可以绑定到静态方法

    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()
        {
         //...
        }
    }
    

    【讨论】:

      猜你喜欢
      • 2012-07-11
      • 1970-01-01
      • 2014-12-06
      • 2011-12-20
      • 2014-05-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多