title: Building a dynamic editable matrix - ASP.NET
body: <p>Scenario:</p>
  
  <p>I am building a flexible discounting component, whereby discounts can be specified for different types of customers against different types of products (means tested). The discount categories, product types and discount rates are all configurable by the user and ideally I would like the user to be able to view and edit the discount relationships on a single screen i.e. Product Types down the left-hand side, Discount Categories along the top, with the assigned discount rate displayed in the corresponding "cell".</p>
  
  <p>I am trying to find the best solution for displaying this data in tabular format. A repeater does not seem to fit the bill, nor does the data grid/list controls. The only option I can think of is to construct the HTML dynamically either server-side using loops and outputting to a literal control, or by sending the serialized data (in XML format) back to the client and using JavaScript to again dynamically build the matrix.</p>
  
  <p>Any other ideas would be appreciated.</p>