Skip to content

DevExpress-Examples/asp-net-web-forms-grid-command-buttons-in-hot-tracked-rows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grid View for ASP.NET Web Forms - How to display a command or custom button in hot-tracked rows only

This example demonstrates how to use CSS classes to hide command or custom buttons and display them in hot-tracked rows only.

Show buttons

Overview

Set the grid's EnableRowHotTrack property to true to allow the grid to highlight hot-tracked rows.

<dx:ASPxGridView ID="gridView" runat="server" ... >
    <!-- ... --> 
    <SettingsBehavior EnableRowHotTrack="true" />
</dx:ASPxGridView>

Create a button and specify its visibility in a CSS class. To display the button in a hot-tracked row, add the CSS class to the grid's RowHotTrack property.

.hottrackButton {
    visibility: hidden;
}
.hottrackRow .hottrackButton {
    visibility: visible;
}
<SettingsCommandButton>
    <EditButton RenderMode="Image" Image-IconID="edit_edit_32x32">
        <Styles>
            <Style CssClass="hottrackButton" />
        </Styles>
    </EditButton>
</SettingsCommandButton>
<Columns>
    <dx:GridViewCommandColumn ShowEditButton="True" ... />
</Columns>
<Styles>
    <RowHotTrack CssClass="hottrackRow"></RowHotTrack>
</Styles>

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Use CSS classes to hide command or custom buttons and display them in hot-tracked rows only.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •