Design question regarding use of Gridview

Discussion in 'ASP .Net Building Controls' started by Robert Chapman, Feb 6, 2007.

  1. Hi,

    I am designing a ASP.NET 2.0 front end for an activity based costing model
    and am interested in getting some general guidance on what design route to
    take. I can work out the specifics but need to make sure I am going down the
    right track. In particular I am unsure whether a gridview will do the job

    Quick intro of the activity based costing model: it splits costs first
    across activities then across products, e.g.:
    $1,000,000 * 40% for Brokerage Activity = $400,000
    $400,000 * 20% for Fixed Income Product = $80,000

    So $80,000 of the $1,000,000 gets allocated to Brokerage, Fixed Income.

    The data is simply sets of percentages adding up to 100%: a list of
    activities adding up to 100% and then a list of products FOR EACH ACTIVITY
    adding up to 100% each. I have one table for activity splits and one for
    product splits.

    The front end for a particular cost area would need to look something like
    the layout below:

    Step 1 – Activity

    1 4 5
    8 13 14 Total
    Ratio 0.4 0.1 0.1
    0.2 0.1 0.1 1.0

    Step 2 – Product

    ProductID Product Name 1 4 5 8
    13 14
    1 Product 1 Name 0.5 0.6
    5 Product 5 Name 0.1 1.0
    6 Product 6 Name 0.6
    17 Product 17 Name 0.1 0.4 0.2
    22 Product 22 Name 0.3
    39 Product 39 Name 0.2
    Total 1.0 1.0 1.0
    1.0 1.0 1.0

    The activities in the top grid would match the activities in the bottom grid.

    Key elements here are that:
    1) The list of activities is dynamic based on the selected cost area. Out
    of 40 activities only a few might have values recorded for that cost area.
    Products are dynamic too but not the same issue when product is on the rows
    rather than the columns.
    2) ALL adjustments need to be made to these grids before the adjustments are
    loaded to the database; when this load attempt does occur they should only
    upload IF the values all add to 100%.
    3) Changes to the database would need to be inserts rather than updates (so
    no overwrites).
    4) Need to display the activity names on the column headers rather than
    their Ids but need to have the Ids for communication with the database.

    1) I’ll either need to use a dynamic template (which I’m not sure how to do
    yet) or I’ll have to include all activities and then programmatically hide
    columns that are full of nulls. Not sure which is the better bet, the second
    seems like a faster solution.

    2) How can I have users editing ALL values in the 2nd grid at once? (with a
    save button that saves all the values at once) Essentially I need the grid
    to treat all values in the grid as a record rather than treating each row as
    a record. Can a gridview do this or do I need to create a custom control? I
    assume also I’ll need to use an objectdatasource rather than a sqldatasource?

    3) Not sure how to get the edit mode of a gridview to handle an insert
    rather than an update.

    Appreciate any thoughts on the direction I should take.


    Robert Chapman, Feb 6, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.