New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Include Next and Previous Buttons in a CommandItemTemlate with Frozen Columns

Description

By design, when using the CommandItemTemplate of the RadGrid, the default command menu is hidden. Hence, the default buttons cannot be used out-of-the-box. Taking into account that the Next and Previous buttons (enabled by setting the EnableNextPrevFrozenColumns to true) are not shown as well. 
 

Solution

In order to have the two specific buttons, simply add the corresponding rgNext and rgPrev CSS classes to the custom button element. The handlers are wired to the classes and the buttons will function as expected without any further customization. Here is an example of a CommandItemTemplate with the two buttons:

<CommandItemTemplate>
    <button type="submit" onclick="return false;" title="Next" class="t-button rgActionButton rgNext rgDisabled">
        <span class="t-font-icon rgIcon rgNextIcon"></span>
    </button>
    <button type="submit" onclick="return false;" title="Prev" class="t-button rgActionButton rgPrev">
        <span class="t-font-icon rgIcon rgPrevIcon"></span>
    </button>
</CommandItemTemplate>
In this article
Not finding the help you need? Improve this article