Pump data by row and column to dynamic created column in gridview

Discussion in '.NET' started by johnsonlim026, Feb 27, 2010.

  1. johnsonlim026

    johnsonlim026

    Joined:
    Feb 24, 2010
    Messages:
    2
    I have data in table that need to display to user in such a format in gridview.

    Data format:

    -----------------------------------------------------------------------
    LineNo |DateDay |Date |Shift |Project No|ItemNo|ItemQty| AvailHr
    -----------------------------------------------------------------------
    1.1 |Monday |1/2/2010 |x1 |y1 | z1 | 100 | 0.5
    1.1 |Monday |1/2/2010 |x1 |y1 | z2 | 150 | 0.2
    1.1 |Monday |1/2/2010 |x1 |y1 | z3 | 120 | 0.3
    1.1 |Monday |1/2/2010 |x2 |y2 | z4 | 105 | 0.1


    2.1 |Tuesday |2/2/2010 |x1 |y1 | z1 | 100 | 0.5
    2.1 |Tuesday |2/2/2010 |x1 |y1 | z2 | 150 | 0.9
    2.1 |Tuesday |2/2/2010 |x1 |y1 | z3 | 120 | 0.7
    2.1 |Tuesday |2/2/2010 |x2 |y2 | z4 | 105 | 0.1




    Gridview Format:

    --------------------------------------------------------------------------
    | Monday | Tuesday
    --------------------------------------------------------------------------
    | 1/2/2010 | 2/2/2010
    --------------------------------------------------------------------------
    | X1 | X2 | | x1 | x2|
    --------------------------------------------------------------------------
    1.1 | ItemNo: z1 | Qty=100
    | ItemNo: z2 | Qty=150
    | ItemNo: z3 | Qty=120
    Ttl Avail Hr:1.0

    --------------------------------------------------------------------------
    2.1 | ItemNo: z1 | Qty=100


    I have 2 solution on this:

    (1). Create dynamic column for datatable that just suit to the gridview structure and then change the column header text accordingly when display to user.

    (2).Create dynamic column in gridview and pump data by row and column accroding to the gridview column header text.

    I prefer the second way to do it.but find no ways to pump in the data by row and column into the gridview.
    I have find ways to create dynamic column but no ways to pump in the data to gridview row by row.Does anyone has idea on this?
    johnsonlim026, Feb 27, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. H5N1
    Replies:
    0
    Views:
    2,700
  2. davemitc@gmail.com
    Replies:
    63
    Views:
    14,651
    christhevet
    Mar 20, 2011
  3. studyandtelecom@yahoo.com

    Micro-pump is cool idea for future computer chips

    studyandtelecom@yahoo.com, Jul 13, 2006, in forum: Java
    Replies:
    1
    Views:
    368
    John Jay Smith
    Jul 13, 2006
  4. maurban@gmail.com
    Replies:
    5
    Views:
    648
    maurban@gmail.com
    Oct 13, 2006
  5. D
    Replies:
    0
    Views:
    197
Loading...

Share This Page