我需要conccat两列
FirstName + LastName。
我需要创建一个columnt DisplayName。
这是怎么回事? 接收数据时我不能这样做 \ grid
ResultGrid = new JQGrid
{
Columns = new List<JQGridColumn>()
{
new JQGridColumn
{
DataField = "ID",
PrimaryKey = true,
Editable = false,
Visible = false,
},
new JQGridColumn
{
DataField = "FirstName",
Visible = false,
},
new JQGridColumn
{
DataField = "LastName",
Visible = false,
},
new JQGridColumn
{
DataField = "EmployeeDisplay",
Editable = false,
Searchable = true,
DataType = typeof(Int32),
SearchToolBarOperation = SearchOperation.IsEqualTo,
SearchType = SearchType.DropDown,
Formatter = new CustomFormatter(){FormatFunction = ""}
},
new JQGridColumn
{
DataField = "Date",
SearchType = SearchType.DatePicker,
DataType = typeof (DateTime),
SearchControlID = "DatePicker",
SearchToolBarOperation = SearchOperation.IsEqualTo,
Editable = false,
},
new JQGridColumn
{
DataField = "Yield",
Editable = false,
},
new JQGridColumn
{
DataField = "Credit",
Editable = false
},
new JQGridColumn
{
DataField = "Balance",
Editable = false
},
},
Width = Unit.Pixel(1000),
Height = Unit.Pixel(500)
};
数据:
var joinTransationAndEmployee = employees.Join(transaction, e => e.TimeAccountID, tl => tl.AccountID,
(employee, log) =>
new
{
log.ID,
log.Date,
log.Credit,
log.Yield,
log.Balance,
FirstName= employee.FirstName,
LastName = employee.LastName
});
return model.ResultGrid.DataBind(joinTransationAndEmployee);