Display content on Button click

1
Hello All, I have entity named orders, I want that on screen there are 3 buttons Pending, Approved and Rejected. When I click on Pending button then all records with pending status should display and when I click Approved button then Approved orders should display and same goes for Rejected button. I want to display different contents on same page and same data view. How can I achieve that? Thank you all in advance.    
asked
1 answers
1

You can do the following to realise this (there are multiple methods, but this one is my preferred one).

 

  1. Make an enumeration with the 3 options (pending, approved &  rejected)
  2. At the creation / update / rejection of the order-entity add the correct enumeration
  3. make 3 buttons that set the right enumeration option
  4. on the dataview (if you're using a datasource) use the enumeration option to filter the list you're returning to the dataview, if no enumeration has been selected, return the whole list, otherwise filter it by the expression “Order.Status = ModuleName.StatusEnumeration.Pending” etc
answered