0

我有一个包含多个列/行的网格(Razor-c#),并且有一个名为利润/损失的列。对于每一行,我需要检查利润/损失列中的前一行数据并进行一些计算以将值放入当前行损益栏

更新

Html.Kendo().Grid(Model.accountHistory).Name("History").Columns(c =>
 {


     c.Bound(p => p.datetimecalculated).Format("{0:dd-MM-yyyy}");
     c.Bound("").ClientTemplate("#= purchaseCriteria(data) #").Title(" ");
     c.Bound(p => p.numcontracts).ClientTemplate("#= moneyFormat(numcontDFracts) #");
     c.Bound(p => p.entityid);
     c.Bound(p => p.leagueid);
     c.Bound("")
         .ClientTemplate("#= setSeasonYear(data) #")
         .Sortable(false)
         .Title("Year");

     c.Bound("")
         .ClientTemplate("#= setSeason(data) #")
         .Sortable(false)
         .Title("Season");
     c.Bound(p => p.contractmeasurable);
     c.Bound(p => p.price).ClientTemplate("#= moneyformat_at(DDEDE) #");
     c.Bound(p => p.profitorloss).ClientTemplate("#= moneyFormat(profitorloss) #");
     c.Bound(p => p.cashBalance).ClientTemplate("#= moneyFormat_diff(cashBalance) #");

 }).DataSource(
d => d
    .Ajax()
    .ServerOperation(false)

)
.Pageable()
.Sortable()
.Resizable(resizing => resizing.Columns(true))
        )
4

0 回答 0