Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
Multiline igGrid field available in ASP.NET MVC Razor?
posted

Is it possible to activate the multiline editing of cells of a igGrid (using MVC Razor)? At this forum question (http://es.infragistics.com/community/forums/t/76002.aspx) the first replay describes a solution using JavaScript. How can I do this multiline editing like for "Product Name" but for ASP.NET MVC igGrids?

Parents
  • 17590
    Verified Answer
    Offline posted

    Hello Stanislas,

    Thank you for posting in our community.

    Setting the multiline mode for the igGrid editor in MVC could be achieved via the ColumnSetting collection of the Updating feature. For example:


      @(Html.Infragistics().Grid(Model)
      .ID("grid1")
      .Height("300px")
      .AutoGenerateColumns(false)
      .PrimaryKey("ProductID")
      .Columns(col =>
    {
        col.For(c => c.ProductID).HeaderText("ProductID");
        col.For(c => c.Name).HeaderText("Name");
        col.For(c => c.ReleaseDate).HeaderText("ReleaseDate");
    })
    .Features(features =>
    {
        features.Updating().EditMode(GridEditMode.Row).ColumnSettings(cs => {
            cs.ColumnSetting().ColumnKey("Name").EditorOptions("textMode : 'multiline'");       
        });
       
    })
    .DataSourceUrl(Url.Action("GetData"))
    .Render())

    I hope you find this information helpful.

    Please let me know if you need any further assistance with this matter.

Reply Children