I have little experience with the Kendo Grid HTMLHelper for ASP.Net MVC and have a couple of different scenarios in which I ideally need to specify multiple model items to be used in a "Columns.Bound()" clause for an @Html.kendo.grid declaration. One is where I need to concatenate two model items for the value of a particular column.
The other is where I need to have the title/tooltip for a column for one model item be the contents of another model item in that same row as in the following:
columns.Bound(model => model.modelItem1).Title("Reason Dump Taken").ClientTemplate("#= getTruncatedValue(modelItem1,36)#").Width(180).HtmlAttributes(new { title = " #= modelItem2 # "});
In both cases adding the 2nd model item, either as "modelItem2" or as "model.modelItem2" throw syntax errors. I've searched this forum and others and haven't seen a syntax for simply implementing the first one.
I did see a more lengthy workaround for the second that involved registering a javascript function to be called when a tooltip was requested; getting the grid row in that function, and trying to provide the 2nd model item via that mechanism.
But it would be much easier if I could just specify something more like title = " #= modelItem2 # ".
Thanks in advance,
-Bob
The other is where I need to have the title/tooltip for a column for one model item be the contents of another model item in that same row as in the following:
columns.Bound(model => model.modelItem1).Title("Reason Dump Taken").ClientTemplate("#= getTruncatedValue(modelItem1,36)#").Width(180).HtmlAttributes(new { title = " #= modelItem2 # "});
In both cases adding the 2nd model item, either as "modelItem2" or as "model.modelItem2" throw syntax errors. I've searched this forum and others and haven't seen a syntax for simply implementing the first one.
I did see a more lengthy workaround for the second that involved registering a javascript function to be called when a tooltip was requested; getting the grid row in that function, and trying to provide the 2nd model item via that mechanism.
But it would be much easier if I could just specify something more like title = " #= modelItem2 # ".
Thanks in advance,
-Bob