This question is locked. New answers and comments are not allowed.
I'm trying get a page to allow multiple grids, which is pretty easy to do, but I need to have each use server binding with a custom paging implementation. Logically it makes sense to simple decorate the action with two GridActions each with a unique GridName and ActionParameterName to keep them separate. but the attribute has been flagged as being only allowed once per action. I did find this post covering the same thing (Multiple Grids with Server Binding) but it was last touched almost a year ago. Has there been any progress on the problem since?
My code would look something like this if it would allow me to actually have multiple GridCommands. Any other way to do this?
My code would look something like this if it would allow me to actually have multiple GridCommands. Any other way to do this?
[GridAction(GridName = "Invoices", ActionParameterName = "invoicesGridCommand")][GridAction(GridName = "Payments", ActionParameterName = "paymentsGridCommand")]public ActionResult Summary(Guid id, GridCommand invoicesGridCommand, GridCommand paymentsGridCommand){ int invoiceCount = 0; int paymentCount = 0; AccountSummaryModel model = new AccountSummaryModel(); var invoices = invoiceService.GetInvoicesByClient(id, invoicesGridCommand.Page, invoicesGridCommand.PageSize, out invoiceCount); var payments = paymentService.GetPaymentsByClient(id, paymentsGridCommand.Page, paymentsGridCommand.PageSize, out paymentCount); model.Invoices = new PagedList<Invoice>(invoices, invoiceCount); model.Payments = new PagedList<Invoice>(payments, paymentCount); return View(new model);}