title: Dev Express Mvc Editing GridViewSetting error?
body: <p>my code is too long so sorry :)</p>
  
  <pre><code>@model IEnumerable&lt;Osos11.Models.Customers&gt;
  @Html.DevExpress().GridView(
  settings =&gt;
  {
      settings.Name = "gvEditing";
      settings.KeyFieldName = "sno";
      settings.CallbackRouteValues = new { Controller = "Customer", Action = "EditingPartial" };
      settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
  
      settings.Columns.Add(column =&gt;
      {
          column.Caption = "#";
          column.SetDataItemTemplateContent(c =&gt;
          {
              ViewContext.Writer.Write(
                  Html.ActionLink("Edit", "EditingEdit", new { sno = DataBinder.Eval(c.DataItem, "sno") }) + "&amp;nbsp;" +
                  Html.ActionLink("Delete", "EditingDelete", new { sno = DataBinder.Eval(c.DataItem, "sno") },
                      new { onclick = "return confirm('Do you really want to delete this record?')" })
              );
          });
          column.SetHeaderTemplateContent(c =&gt;
          {
              ViewContext.Writer.Write(
                  Html.ActionLink("New", "EditingEdit", new { sno = -1 }).ToHtmlString()
              );
          });
          column.Settings.AllowDragDrop = DefaultBoolean.False;
          column.Settings.AllowSort = DefaultBoolean.False;
          column.Width = 70;
      });
      settings.Columns.Add("Name");
      //settings.Columns.Add(column =&gt;
      //{
      //    column.FieldName = "CategoryID";
      //    column.Caption = "Category";
  
      //    column.ColumnType = MVCxGridViewColumnType.ComboBox;
      //    var comboBoxProperties = column.PropertiesEdit as ComboBoxProperties;
      //    comboBoxProperties.DataSource = NorthwindDataProvider.GetCategories();
      //    comboBoxProperties.TextField = "CategoryName";
      //    comboBoxProperties.ValueField = "CategoryID";
      //    comboBoxProperties.ValueType = typeof(int);
      //});
      settings.Columns.Add("CustomerNumber");
      //settings.Columns.Add("UnitPrice").PropertiesEdit.DisplayFormatString = "c";
      //settings.Columns.Add("UnitsInStock");
      //settings.Columns.Add("Discontinued", MVCxGridViewColumnType.CheckBox);
  
      settings.ClientLayout = (s, e) =&gt;
      {
          if (e.LayoutMode == ClientLayoutMode.Loading)
          {
              if (Session["GridState"] != null)
                  e.LayoutData = (string)Session["GridState"];
          }
          else
              Session["GridState"] = e.LayoutData;
      };
      settings.PreRender = (s, e) =&gt;
      {
          if (ViewData["VisibleID"] == null) return;
  
          ASPxGridView grid = (ASPxGridView)s;
          grid.MakeRowVisible(ViewData["VisibleID"]);
      };
  }).Bind(Model).GetHtml()
  </code></pre>
  
  <p>I got this error</p>
  
  <pre><code>Compiler Error Message: CS1660: Cannot convert lambda expression to type 'DevExpress.Web.Mvc.GridViewSettings' because it is not a delegate type
  </code></pre>