Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146937 | Aug 26,2019 12:23 PM UTC | Aug 27,2019 11:01 AM UTC | ASP.NET MVC - EJ 2 | 2 |
![]() |
Tags: Grid |
@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.DataSource).
. ..
. . .
AllowGrouping().GroupSettings(group => { group.Columns(new string[] { "Freight" }).CaptionTemplate("#captiontemplate"); }).Render()
<script id="captiontemplate" type="text/x-template">
${format(data)}
</script>
<script>
window.format = function (data) {
var inst = document.getElementById('Grid').ej2_instances[0]
var val = inst.getColumnByIndex(inst.getColumnIndexByField(data.field) + 1).field + ' - ' + data.key;
return val;
}
</script> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.