Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 3.57 KB

File metadata and controls

54 lines (40 loc) · 3.57 KB

Grid View for ASP.NET Web Forms - Reorder Grid Rows Using Buttons and Drag-and-Drop

This example demonstrates how to use buttons and jQuery drag-and-drop functionality to reorder rows in ASPxGridView.

ASPxGridView - ReorderGridRows

Set up the grid and create an invisible column that stores row order indices. Sort the grid by this column and disable sorting at the control level.

<dx:ASPxGridView ID="gvProducts" runat="server" ...>
    <Columns>
        ...
        <dx:GridViewDataTextColumn FieldName="DisplayOrder" Visible="false" SortIndex="0"
            SortOrder="Ascending" />
    </Columns>
    <SettingsBehavior AllowSort="false" ... />
    ...
</dx:ASPxGridView>

When a user clicks the button or drags and drops a row, the grid sends a callback to the server, sets the invisible column value to a new row order index, and updates the grid data.

Files to Look At

Documentation

More Examples

Does this example address your development requirements/objectives?

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