///
/// Override the ${Field Label}_Click to customize the sort order
///
public override void ${Field Label}_Click(object sender, EventArgs args)
{
OrderByItem sd = this.CurrentSortOrder.Find(${${Database Table}ClassName}.${Field Name});
if (!(sd == null))
{
sd.Reverse();
}
else
{
this.CurrentSortOrder.Reset();
// Set the sort order for the selected field
this.CurrentSortOrder.Add(${${Database Table}ClassName}.${Field Name}, BaseClasses.Data.OrderByItem.OrderDir.Asc);
}
this.DataChanged = true;
}
|