Telerik blogs

With our upcoming version of RadControls for ASP.NET AJAX (early November) you will be able to bind our grid even if the grid is in edit mode. RadGrid will locate automatically all built-in column editors (GridNumericColumn, GridDropDownColumn, GridDateTimeColumn, etc.) and you can get old/new values directly from the grid client-side API.

You can use client-side editing completely codeless with templates as well. The requirement here is to set ID for the control to be equal to desired data field.

Example:

<telerik:GridTemplateColumn HeaderText="CompanyName">
<EditItemTemplate>
  
<telerik:RadTextBox ID="CompanyName" runat="server" />
</EditItemTemplate>
</telerik:GridTemplateColumn>

We have introduced also three new client-side methods for GridTableView to get new values, old values and keys for particular GridDataItem.

Example:

var newValues = $find("RadGrid2").get_masterTableView().extractValuesFromItem(0) ; // get first item new values

var newValues = $find("RadGrid2").get_masterTableView().extractOldValuesFromItem(0) ; // get first item old values

var newValues = $find("RadGrid2").get_masterTableView().extractKeysFromItem(0) ; // get first item keys

 

I've made small example using two grids (master/detail) both bound completely client-side to illustrate this new functionality:

Untitled

Enjoy!

[Download]


About the Author

Vladimir Enchev

is Director of Engineering, Native Mobile UI & Frameworks

Comments

Comments are disabled in preview mode.