是否有使用VB.NET的MVCGrid.net的可用示例?
试过很多方法,比如这个......
MVCGridDefinitionTable.Add("EmployeeGrid", New MVCGridBuilder(Of Person)().WithAuthorizationType(AuthorizationType.AllowAnonymous).AddColumns(Sub(cols)
cols.Add("Id").WithValueExpression(Function(p) p.Id.ToString())
cols.Add("FirstName").WithHeaderText("First Name").WithValueExpression(Function(p) p.FirstName)
cols.Add("LastName").WithHeaderText("Last Name").WithValueExpression(Function(p) p.LastName)
End Sub).WithRetrieveDataMethod(Function(options)
Dim result = New QueryResult(Of Person)()
Using db = New SampleDatabaseEntities()
result.Items = db.People.Where(Function(p) p.Employee).ToList()
End Using
Return result
End Function))
......但是某些事情仍然存在。任何指针或示例都会非常感激。
谢谢
答案 0 :(得分:0)
已经找到了部分内容
MVCGridDefinitionTable.Add(Of GridModal)("CurrentBalanceGrid", New MVCGrid.Models.MVCGridBuilder(Of GridModal)().WithAuthorizationType(MVCGrid.Models.AuthorizationType.AllowAnonymous).AddColumns(Sub(cols)
cols.Add("Id").WithValueExpression(Function(p) p.TransactionID.ToString())
cols.Add("DebitAmount").WithHeaderText("Debit").WithValueExpression(Function(p) p.DebitAmount)
cols.Add("CreditAmount").WithHeaderText("Credit").WithValueExpression(Function(p) p.CreditAmount)
现在只需要连接数据