Using MVC (Razor), how can I get in igGrid a empty column like:
{ headerText: "", key: "Delete", dataType: "string", width: "20%", unbound: true, template: "" }
.Columns(column => { column.For(x => x.ModelX1.First().ID).HeaderText("Meeting ID")); column.For(" ... ")......);
column(" ... ")......);
});
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'/>");})
.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:
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.
Perfect :) exactly what I want.
Please feel free to contact me if you have any additional concerns or questions regarding this matter.