Thursday 11 October 2012

Telerik MVC Extensions Grid - AJAX in cell editing (batch editing) with readonly columns

If you are using AJAX in-place editing, if a column is readonly then the value will not be passed to the controller on the update AJAX method.

The solution is to remove the ReadOnly attribute from the datasource viewmodel, and instead apply it to the column.

public class TransactionViewModel {
[  [ReadOnly(true)]
  public Int32 DealNum { get; set; }

columns.Bound(m => m.DealNum).Width(70).Title("Deal No.").ReadOnly();

Other references

No comments:

Post a Comment