Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
144467 | May 7,2019 09:49 PM UTC | May 9,2019 03:37 AM UTC | ASP.NET MVC | 3 |
![]() |
Tags: Grid |
@(Html.EJ().Grid<Object>("Grid")
.Datasource((IEnumerable<Object>)ViewBag.dataSource)
.ToolbarSettings(toolBar => toolBar.ShowToolbar().ToolbarItems(items =>
{
items.AddTool(ToolBarItems.ExcelExport);
items.AddTool(ToolBarItems.WordExport);
items.AddTool(ToolBarItems.PdfExport);
}))
.Columns(col =>
{
col.Field("payment_date").HeaderText("Početak").Format("{0:dd.MM.yyyy.}").Type("date").Width(100).Add();
col.Field("fund_amt").HeaderText("Amount Invested").Format("{0:n0}").TextAlign(TextAlign.Right).Add();
col.Field("commision_items_value").HeaderText("Commission Entitlement").Format("{0:p0}").TextAlign(TextAlign.Right).Add();
col.Field("amt").HeaderText("Profit Bonus").Format("{0:n0}").TextAlign(TextAlign.Right).Add();
col.Field("currentcy_Code").HeaderText("Currency").TextAlign(TextAlign.Right).Add();
})
.ClientSideEvents(eve => { eve.QueryCellInfo("formatingCell"); })
) |
<button id="Btn" onclick="data()">Data Bind</button>
@(Html.EJ().Grid<Object>("Grid")
…………………………………………………………..
.ClientSideEvents(eve => { eve.QueryCellInfo("formatingCell"); })
)
<script type="text/javascript">
function data() {
$.ajax({
url: "@(Url.Action("UseShippingAddress", "Grid"))",
type: "POST",
data: { id: 50 },
cache: false,
async: true,
success: function (data) {
var Obj = $("#Grid").ejGrid("instance");
Obj.dataSource(ej.parseJSON(data));
}
});
};
</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.