Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / Creating empty column without model-relation with mvc

Creating empty column without model-relation with mvc

New Discussion
Stanislas Mauser
Stanislas Mauser asked on Jun 23, 2015 2:02 PM

Using MVC (Razor), how can I get in igGrid a empty column like:

{ headerText: "", key: "Delete", dataType: "string", width: "20%", unbound: true, template: "" }Code from: http://www.igniteui.com/grid/column-template

What I need is something like this:

.Columns(column => {
column.For(x => x.ModelX1.First().ID).HeaderText("Meeting ID"));
column.For(" ... ")......);
   column(" ... ")......);
});
Sign In to post a reply

Replies

  • 0
    Vasya Kacheshmarova
    Vasya Kacheshmarova answered on Jun 22, 2015 4:43 PM

    Hello Stanislas,

    Thank you for posting in our community.

    What I can suggest for adding an unbound column in igGrid is adding it in the columns collection as following:

    .Columns(col =>{    col.For(c => c.ProductID).HeaderText("ProductID");
    .col.Unbound("Delete").HeaderText("Delete").DataType("string").Template("<input type='button' value='Delete row' onclick='deleteRow(${ProductID})' class='delete-button'/>");})

     

    I believe you will find the following articles in our documentation useful:

    I believe you will find the following articles in our documentation useful:

    Populating Unbound Columns Remotely

    Populating Unbound Columns Locally

    If you have any additional questions after having a look at my code snippets and the provided articles please feel free to contact me.

    • 0
      Stanislas Mauser
      Stanislas Mauser answered on Jun 23, 2015 1:34 PM

      Perfect 🙂 exactly what I want. 

      • 0
        Vasya Kacheshmarova
        Vasya Kacheshmarova answered on Jun 23, 2015 2:02 PM

        Hello Stanislas,

        Please feel free to contact me if you have any additional concerns or questions regarding this matter.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Stanislas Mauser
Favorites
0
Replies
3
Created On
Jun 23, 2015
Last Post
10 years, 9 months ago

Suggested Discussions

Created by

Created on

Jun 23, 2015 2:02 PM

Last activity on

Feb 23, 2026 9:36 AM