Skip to content

Instantly share code, notes, and snippets.

@ebello
Created July 25, 2008 21:21
Show Gist options
  • Save ebello/2531 to your computer and use it in GitHub Desktop.
Save ebello/2531 to your computer and use it in GitHub Desktop.
string[] ids = this.Parameters["OrderByRank"].Split(',');
for (int x = 0; x < ids.Length; x++)
{
Event foundevent = ec.Find(delegate(Event e)
{
return e.ViewID == ids[x];
});
if (foundevent != null)
foundevent.Order = -1000 + x; // start at -1000 because the default order is 0
}
ec.Sort("Order");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment