i have a list of products that are being displayed in particular order. store admin can reassign the display order, by moving the "hot" items to the top of the list. what's the best way of implementing the admin functionality UI [asp.net C#]? Products table has a [displayOrder(int)] filed which determines the display order.
我有一个按特定顺序显示的产品列表。商店管理员可以通过将“热门”项目移动到列表顶部来重新分配显示顺序。什么是实现管理功能UI [asp.net C#]的最佳方式? Products表有一个[displayOrder(int)]字段,用于确定显示顺序。
i'm looking for something intuitive and simple.
我正在寻找直观而简单的东西。
thank you.
p.s. i guess i didn't make myself clear, i'm looking for UI advice more than anything.
附:我想我没有说清楚,我正在寻找UI建议比什么都重要。
SOLUTION: ReorderList worked out great, this article helped too. Also, make sure OldValuesParameterFormatString="{0}" in your DataSource.
解决方案:ReorderList效果很好,本文也有所帮助。另外,请确保DataSource中的OldValuesParameterFormatString =“{0}”。
4 个解决方案
#1
2
using AJAX you could implement a Reoder list control you can find more information here http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ReorderList/ReorderList.aspx
使用AJAX你可以实现一个Reoder列表控件,你可以在这里找到更多信息http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ReorderList/ReorderList.aspx
Mauro
#2
2
You need a Rank field for each product (which could also be the DisplayOrder field).
When the administrator ups or downs a product, update the rank value.
When you need to list the products, do a select query which sorts in DESC order of rank.
每个产品都需要一个Rank字段(也可以是DisplayOrder字段)。当管理员启动或关闭产品时,请更新排名值。当您需要列出产品时,请执行以DESC顺序排序的选择查询。
#3
0
i'm implementing that using the 'Order' column/property where people input numbers like 10, 20, 30 (i have ascending ordering). i have a list of items with text boxes to input order, and an 'apply order' button that saves new values to the database and reorders/reloads items on the page with the new ordering applied.
我正在使用'Order'列/属性来实现,其中人们输入数字,如10,20,30(我有升序)。我有一个项目列表,其中包含用于输入订单的文本框,以及一个“应用订单”按钮,用于将新值保存到数据库,并在应用新订单的情况下重新排序/重新加载页面上的项目。
i don't forbid inputting the same value for two items, i sort them by name as a second sort parameter, or leave it to the database to sort it at will if it doesn't matter much. i believe it's understandable enough to put it that way, it seems like an ordered list which everybody understand easily.
我不禁止为两个项输入相同的值,我按名称将它们排序为第二个排序参数,或者将它留给数据库以便在不重要的情况下随意对其进行排序。我认为这样说是可以理解的,它似乎是一个人人都能轻易理解的有序列表。
#4
0
If you can modify the database, add an IsHot column. Then sort by IsHot and DisplayOrder (in that order). This will keep the products in the correct order and the "hot" products will bubble up to the top.
如果可以修改数据库,请添加IsHot列。然后按IsHot和DisplayOrder排序(按此顺序)。这将使产品保持正确的顺序,“热”产品将升级到顶部。
#1
2
using AJAX you could implement a Reoder list control you can find more information here http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ReorderList/ReorderList.aspx
使用AJAX你可以实现一个Reoder列表控件,你可以在这里找到更多信息http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ReorderList/ReorderList.aspx
Mauro
#2
2
You need a Rank field for each product (which could also be the DisplayOrder field).
When the administrator ups or downs a product, update the rank value.
When you need to list the products, do a select query which sorts in DESC order of rank.
每个产品都需要一个Rank字段(也可以是DisplayOrder字段)。当管理员启动或关闭产品时,请更新排名值。当您需要列出产品时,请执行以DESC顺序排序的选择查询。
#3
0
i'm implementing that using the 'Order' column/property where people input numbers like 10, 20, 30 (i have ascending ordering). i have a list of items with text boxes to input order, and an 'apply order' button that saves new values to the database and reorders/reloads items on the page with the new ordering applied.
我正在使用'Order'列/属性来实现,其中人们输入数字,如10,20,30(我有升序)。我有一个项目列表,其中包含用于输入订单的文本框,以及一个“应用订单”按钮,用于将新值保存到数据库,并在应用新订单的情况下重新排序/重新加载页面上的项目。
i don't forbid inputting the same value for two items, i sort them by name as a second sort parameter, or leave it to the database to sort it at will if it doesn't matter much. i believe it's understandable enough to put it that way, it seems like an ordered list which everybody understand easily.
我不禁止为两个项输入相同的值,我按名称将它们排序为第二个排序参数,或者将它留给数据库以便在不重要的情况下随意对其进行排序。我认为这样说是可以理解的,它似乎是一个人人都能轻易理解的有序列表。
#4
0
If you can modify the database, add an IsHot column. Then sort by IsHot and DisplayOrder (in that order). This will keep the products in the correct order and the "hot" products will bubble up to the top.
如果可以修改数据库,请添加IsHot列。然后按IsHot和DisplayOrder排序(按此顺序)。这将使产品保持正确的顺序,“热”产品将升级到顶部。