简体   繁体   English

如何重新排序GridView行?

[英]How can I reorder rows GridView?

My gridview has a list, and the record's list have priorities. 我的gridview有一个列表,记录的列表有优先级。 I need to click and drag rows to modify the priorities. 我需要单击并拖动行以修改优先级。 For example: 例如:

Register 1  - Priority 1 

Register 2  - Priority 2  

Register 3  - Priority 3

If I click and drag the row of Register 1 to last row, it must be: 如果单击并将寄存器1的行拖到最后一行,它必须是:

Register 3 - Priority 1 

Register 2 - Priority 2

Register 1 - Priority 3

I have not understand if your problem is with a gridview or an ASPxGridview. 我不明白您的问题是与gridview还是ASPxGridview有关。

If you are using a devexpress grid view (for example in a winform) you could apply a solution like that https://www.devexpress.com/Support/Center/Example/Details/E764 where the row Order is you field Priority. 如果使用devexpress网格视图(例如在winform中),则可以应用https://www.devexpress.com/Support/Center/Example/Details/E764之类的解决方案,其中“行顺序”是“优先级”字段。

If you are using an ASPxGridview in a web application the scenario is a bit more complex,but i suppose you can follow this tutorial https://www.devexpress.com/Support/Center/Example/Details/E4582 如果在Web应用程序中使用ASPxGridview,则场景会稍微复杂一些,但我想您可以按照本教程进行操作https://www.devexpress.com/Support/Center/Example/Details/E4582

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM