Populate grid control using Container.DataItem command

Discussion in 'ASP .Net Web Controls' started by csgraham74@hotmail.com, Sep 14, 2005.

  1. Guest

    Hello,

    Im developing an application in ASP.Net and im just attempting to
    develop my first control.

    What im trying to do is to create a control that has a datagrid with
    four rows. The top row will be slighlty different than the other 3 rows
    in terms of how the data is displayed therefore i dont think i can use
    a datagrid with repeating rows. I was thinking of using one cell in the
    grid with a table inside it.

    To do this i want to select 4 records fom my database, insert into a
    dataset and bind to my grid. My problem is how to populate the fields
    of the datagrid with the correct information. i know how to use the
    DataBinder.Eval(Container.DataItem,"val1") command but i dont know how
    to iterate the dataset using this command to extract the correct
    information.

    What i want to do is the following :-
    Extract data from record 1 into the top row / data from record 2 into
    the second row / data from record 3 into the third row / data from
    record 4 into the fourth row.

    How do i do this loop using the
    DataBinder.Eval(Container.DataItem,"val1") command.

    Any ideas on how to do this greatly appreciated

    Thanks in advance.
     
    , Sep 14, 2005
    #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. Earl Teigrob
    Replies:
    0
    Views:
    448
    Earl Teigrob
    Jul 7, 2004
  2. Patrick.O.Ige
    Replies:
    0
    Views:
    596
    Patrick.O.Ige
    Mar 16, 2006
  3. abargaddon
    Replies:
    2
    Views:
    22,999
    abargaddon
    Feb 2, 2008
  4. Chumley the Walrus

    How do I assign a variable to a container.dataitem in repeater control

    Chumley the Walrus, May 12, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    332
    Chumley the Walrus
    May 12, 2004
  5. Joe Rattz
    Replies:
    2
    Views:
    604
    Robert Koritnik
    Sep 10, 2004
Loading...

Share This Page