This example demonstrates how to create a templated column, add content to the template, and use client-side GetCellTextContainer and GetControlsByPredicate methods to access and modify the template content in batch edit mode.
Specify a column's DataItemTemplate property and populate the template with content. To access the templated cell's container in batch edit mode, call the grid's client-side BatchEditApi.GetCellTextContainer method. To get any client objects within the specified container, call the client-side GetControlsByPredicate method.
function GetControl(visibleIndex, column) {
return ASPx.GetControlCollection().GetControlsByPredicate(function (c) {
var parent = grid.batchEditApi.GetCellTextContainer(visibleIndex, column);
return ASPx.GetIsParent(parent, c.GetMainElement());
})[0];
}- AppClientCode.js (VB: AppClientCode.js)
- Default.aspx (VB: Default.aspx)
- Default.aspx.cs (VB: Default.aspx.vb)
(you will be redirected to DevExpress.com to submit your response)
