|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Data View SortationI am updating an asp.net application to implement caching - I have stored a list of menu information that is diplayed in a dataset and filter it at runtime using a dataview based on the area of the system the user is in. I have done this by having the menu name, url and then a list of hash-delimited IDs that is then filtered on at runtime to display the correct menus for the area that the user is in: Page 1, Page1.aspx, #1#5#8#7# Page 2, Page2.aspx, #2#5#8#6# Page 3, Page3.aspx, #2#4#8#6# So, when somebody in area ID 5 views the menu they see pages 1 and 2, through adding a filter to the dataview: objDataView.RowFilter = "IDList LIKE '%#5#%'" This works fine but now I need to add in some level of sortation dependant upon the ID that is passed in, i.e. if ID 8 is passed I may want to see the menu displayed in a different order to if, say 5 was passed in. Would it be possible to add an order into my IDList (perhaps adding an ID followed by a semicolon then the order number) and somehow have the dataview order by part of a column rather than the whole column? Cheers, -- Carl Howarth |
|||||||||||||||||||||||