Dynamic Columns
Dynamic Columns
stormcandi
Posts: 1Questions: 0Answers: 0
Hello,
Like most of the people on here, I love this tool!
One issue I am having is how to dynamically set aoColumns. The columns displayed may vary but the column type will not. For example, Serial Number will never be an editable column. School Location will always be a select; however may not always be a column that is visible.
I have the column names in a ViewBag and can create a javascript array to hold the columns visible. However my formatting is not working when I try to set it.
[code]
var columnHeaders = new Array();
var viewBag = @Html.Raw(Json.Encode(@ViewBag.Columns));
var array = viewBag.split(",");
for (var i = 0; i
Like most of the people on here, I love this tool!
One issue I am having is how to dynamically set aoColumns. The columns displayed may vary but the column type will not. For example, Serial Number will never be an editable column. School Location will always be a select; however may not always be a column that is visible.
I have the column names in a ViewBag and can create a javascript array to hold the columns visible. However my formatting is not working when I try to set it.
[code]
var columnHeaders = new Array();
var viewBag = @Html.Raw(Json.Encode(@ViewBag.Columns));
var array = viewBag.split(",");
for (var i = 0; i
This discussion has been closed.