This question is locked. New answers and comments are not allowed.
Hi!
A modification of the Telerik-CustomBinding-Example will show you what I mean with "complex expressions in columns doesn't work".
I only changed the line where the second column is defined and added "+ "AppendThisString"" to the existing lambda expression. Now it's more then a simple property. At the first look it seems to work, but if I change the page and load new data by ajax, the secound column will not execute the expression and so the old data are still shown in this column.
By the way... the same happens with the row-id-tag (calculated by the RowAction-expression). If you change the page, the id of the row is still old, too.
Any ideas?
Greetings
Manuel
A modification of the Telerik-CustomBinding-Example will show you what I mean with "complex expressions in columns doesn't work".
| <%= Html.Telerik().Grid(Model) |
| .Name("Grid") |
| .Columns(columns => |
| { |
| columns.Add(o => o.OrderID).Width(100); |
| columns.Add(o => o.Customer.ContactName + "AppendThisString").Width(200); |
| columns.Add(o => o.ShipAddress); |
| columns.Add(o => o.OrderDate).Format("{0:MM/dd/yyyy}").Width(100); |
| }) |
| .RowAction( row => row.HtmlAttributes[ "id" ] = row.DataItem.OrderID ) |
| .Ajax(settings => settings.Action("_CustomBinding", "Grid")) |
| .Pageable(settings => settings.Total((int)ViewData["total"])) |
| .EnableCustomBinding(true) |
| .Sortable() |
| %> |
I only changed the line where the second column is defined and added "+ "AppendThisString"" to the existing lambda expression. Now it's more then a simple property. At the first look it seems to work, but if I change the page and load new data by ajax, the secound column will not execute the expression and so the old data are still shown in this column.
By the way... the same happens with the row-id-tag (calculated by the RowAction-expression). If you change the page, the id of the row is still old, too.
Any ideas?
Greetings
Manuel