I tried doing s before posting but i get a javascript error - Uncaught TypeError: originalListAction.method is not a function.
see code below
Javascript Script Code:
_$bagsTable.jtable({
title: app.localize('Bags'),
actions: {
listAction: "/Mpa/DepositProcessingToTreasury/GetBagsToBeTransfered"
},
fields:
{
id: {
key: true,
list: false
},
bagNo: {
title: app.localize('BagNo'),
width: '10%'
},
fit: {
title: app.localize('Fit'),
width: '10%'
},
currencyCode: {
title: app.localize('Currency'),
width: '25%'
},
bagTotal: {
title: app.localize('Total'),
width: '10%'
}
}
});
Controller :
public JsonResult GetBagsToBeTransfered() {
try
{
List<CashMovementTransactionBagListDto> result = new List<CashMovementTransactionBagListDto>();
if (ViewData["Bags"] != null)
{
var bagList = ViewData["Bags"] as List<CreateOrUpdateCashMovementBagDto>;
foreach (var bag in bagList)
result.Add(new CashMovementTransactionBagListDto { BagNo = bag.Bag.BagNo, BagTotal = 0, CashMovementTransactionId = 0, CurrencyCode = "JMD", CurrencyId = 1, Fit = true, Id = 0 });
}
return Json(new { Result = "OK", Records = result });
}
catch (Exception ex)
{
return Json(new { Result = "ERROR", Message = ex.Message });
}
}
Ok, Thanks
i am using JQuery.