aspnetbootstrap-118819-grid-view-templates-template-replacements.md
When you create a template, you often need to only extend the base control functionality. The BootstrapGridViewTemplateReplacement control is designed to help you easily customize the edit form and pager bar while keeping regular controls (edit cells, Update and Cancel buttons, pager). It allows you to put template replacements keeping the base control functionality into your templates. The ASPxGridViewTemplateReplacement.ReplacementType property specifies the controls that are displayed by the BootstrapGridViewTemplateReplacement control.
The table below contains a list of the ReplacementType property values, the template types it can be used in and controls it contains.
| ReplacementType property value | Template type | Contained controls |
|---|---|---|
| EditFormContent | GridViewTemplates.EditForm | Edit form’s entire contents (edit cells and buttons) |
| EditFormEditors | GridViewTemplates.EditForm | Edit cell of each field within a grid |
| EditFormCellEditor | GridViewTemplates.EditForm | Edit cell |
| EditFormUpdateButton | GridViewTemplates.EditForm | Update button |
| EditFormCancelButton | GridViewTemplates.EditForm | Cancel button |
| Pager | GridViewTemplates.PagerBar | Pager |
Edit form template replacements allow you to add regular controls to an edit form template. Note that the regular form editors created by the BootstrapGridViewTemplateReplacement control are automatically validated on the client if their validation settings are defined on a column level.
Edit form’s entire content template replacement
Template replacement of every edit cell
An edit cell template replacement
Update and Cancel buttons template replacements
Set the ASPxGridViewTemplateReplacement.ReplacementType property to GridViewTemplateReplacementType.Pager to get a pager within your template. Note you can use this type of template replacement within the GridViewTemplates.PagerBar template only.
<Templates>
<PagerBar>
<div class="row">
<div class="col-md-10">
<dx:BootstrapGridViewTemplateReplacement ID="GridViewTemplatePager" ReplacementType="Pager" runat="server"></dx:ASPxGridViewTemplateReplacement>
</div>
...
</div>
</PagerBar>
</Templates>