Skip to content

Use buttons and jQuery drag-and-drop functionality to reorder rows in ASPxGridView.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/asp-net-web-forms-grid-reorder-rows-using-buttons-or-drag-and-drop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Use buttons and jQuery drag-and-drop functionality to reorder rows in ASPxGridView.

Topics

Resources

License

Stars

Watchers

Forks