This question is locked. New answers and comments are not allowed.
Hi,
I am binding the columns of a grid to a value on an array object. The grid renders fine, but I get a javascript error:
missing name after . operator
return data.[0].Value;
@model IEnumerable<PivotRow>
@(Html.Telerik().Grid<PivotRow>(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(o => o[0].Value).Format("{0:0}").Width(50).Title("0");
columns.Bound(o => o[1].Value).Format("{0:0}").Width(50).Title("1");
columns.Bound(o => o[2].Value).Format("{0:0}").Width(50).Title("2");
columns.Bound(o => o[3].Value).Format("{0:0}").Width(50).Title("3");
columns.Bound(o => o[4].Value).Format("{0:0}").Width(50).Title("4");
columns.Bound(o => o[5].Value).Format("{0:0}").Width(50).Title("5");
columns.Bound(o => o[6].Value).Format("{0:0}").Width(50).Title("6");
columns.Bound(o => o[7].Value).Format("{0:0}").Width(50).Title("7");
columns.Bound(o => o[8].Value).Format("{0:0}").Width(50).Title("8");
columns.Bound(o => o[9].Value).Format("{0:0}").Width(50).Title("9");
columns.Bound(o => o[10].Value).Format("{0:0}").Width(50).Title("10");
columns.Bound(o => o[11].Value).Format("{0:0}").Width(50).Title("11");
columns.Bound(o => o[12].Value).Format("{0:0}").Width(50).Title("12");
columns.Bound(o => o[13].Value).Format("{0:0}").Width(50).Title("13");
})
.Pageable(pageable => pageable.Enabled(false))
)
The source for PivotRow can be found here:
http://vitamink.googlecode.com/svn/trunk/src/VK/Pivot/PivotRow.cs
(and this class contains the .Value property: http://vitamink.googlecode.com/svn/trunk/src/VK/Pivot/PivotData.cs)
I'm using the latest version of telerik (including jquery-1.5.1.min.js)
Thanks in advance!
David.
I am binding the columns of a grid to a value on an array object. The grid renders fine, but I get a javascript error:
missing name after . operator
return data.[0].Value;
@model IEnumerable<PivotRow>
@(Html.Telerik().Grid<PivotRow>(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(o => o[0].Value).Format("{0:0}").Width(50).Title("0");
columns.Bound(o => o[1].Value).Format("{0:0}").Width(50).Title("1");
columns.Bound(o => o[2].Value).Format("{0:0}").Width(50).Title("2");
columns.Bound(o => o[3].Value).Format("{0:0}").Width(50).Title("3");
columns.Bound(o => o[4].Value).Format("{0:0}").Width(50).Title("4");
columns.Bound(o => o[5].Value).Format("{0:0}").Width(50).Title("5");
columns.Bound(o => o[6].Value).Format("{0:0}").Width(50).Title("6");
columns.Bound(o => o[7].Value).Format("{0:0}").Width(50).Title("7");
columns.Bound(o => o[8].Value).Format("{0:0}").Width(50).Title("8");
columns.Bound(o => o[9].Value).Format("{0:0}").Width(50).Title("9");
columns.Bound(o => o[10].Value).Format("{0:0}").Width(50).Title("10");
columns.Bound(o => o[11].Value).Format("{0:0}").Width(50).Title("11");
columns.Bound(o => o[12].Value).Format("{0:0}").Width(50).Title("12");
columns.Bound(o => o[13].Value).Format("{0:0}").Width(50).Title("13");
})
.Pageable(pageable => pageable.Enabled(false))
)
The source for PivotRow can be found here:
http://vitamink.googlecode.com/svn/trunk/src/VK/Pivot/PivotRow.cs
(and this class contains the .Value property: http://vitamink.googlecode.com/svn/trunk/src/VK/Pivot/PivotData.cs)
I'm using the latest version of telerik (including jquery-1.5.1.min.js)
Thanks in advance!
David.