I still like leaving the Display Order field in charge of determining category order (rather than alphabetizing it in code) but I like refreshing my categories from time to time as new ones are added.
This is a quick SQL statement that renumbers certain category families if it's helpful to anyone:
WITH OrderedCategories AS
(
SELECT CategoryID, Name, ROW_NUMBER() OVER (ORDER BY Name) AS 'RowNumber' FROM Nop_Category WHERE ParentCategoryID=29
)
UPDATE Nop_Category SET DisplayOrder=OC.RowNumber FROM OrderedCategories OC WHERE OC.CategoryID=nop_Category.CategoryID
By using the ROW_NUMBER method within a partition of a result set, it makes fast work of putting the automatically generated DisplayOrder number after the result partition is queried out.
I hope that helps someone!
http://blog.NielsenData.com
The FUZION Agency