Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Web
Mobile
Document Management
Desktop
Reporting
Testing & Mocking
CMS
UI/UX Tools
Debugging
Free Tools
Support and Learning
Productivity and Design Tools
Hello Shukurdin,
To make the NewData property of the event args work as expected, you will need to override the GetNewValueFromEditor method of the custom column.
public class GridViewCustomColumn : GridViewDataColumn { // other code here public override object GetNewValueFromEditor(object editor) { var textBox = (TextBox)editor; return textBox.Text; } }
To make the OldValue work, you will need to bind the Value property to the DataMemberBinding.
public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem) { var textBlock = cell.Content as TextBlock; if (textBlock == null) { textBlock = new TextBlock(); textBlock.SetBinding(TextBlock.TextProperty, this.DataMemberBinding); cell.Content = textBlock; } cell.SetBinding(GridViewCell.ValueProperty, DataMemberBinding); return textBlock; }
I hope this helps.
Regards, Martin Ivanov Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.