code sample wanted: creating and populating a collection of objects from a datasource?

Discussion in 'ASP .Net' started by Guest, Aug 17, 2005.

  1. Guest

    Guest Guest

    Trying to learn about manipulating collections of objects, and populating
    these objects dynamically from datasources. Could someone post a code sample
    that shows the following:

    Instantiating a collection object -- say, a dictionary.
    Populating that collection object with custom objects, say, Person. What I
    really want to see is how to populate the properties of those Person objects
    from a datasource: instantiate one Person, fill Person.FirstName,
    Person.LastName, Person.ID with data, iterate to the next item in the
    datasource, instantiate another person, fill Person.FirstName,
    Person.LastName...

    Any help out there?

    Thanks very much.

    -KF
     
    Guest, Aug 17, 2005
    #1
    1. Advertising

  2. This BarGraph web control contains a collection of Bar objects.
    Full source code is included:
    http://www.SteveOrr.net/articles/BarGraphs.aspx

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    <> wrote in message
    news:...
    > Trying to learn about manipulating collections of objects, and populating
    > these objects dynamically from datasources. Could someone post a code
    > sample that shows the following:
    >
    > Instantiating a collection object -- say, a dictionary.
    > Populating that collection object with custom objects, say, Person. What I
    > really want to see is how to populate the properties of those Person
    > objects from a datasource: instantiate one Person, fill Person.FirstName,
    > Person.LastName, Person.ID with data, iterate to the next item in the
    > datasource, instantiate another person, fill Person.FirstName,
    > Person.LastName...
    >
    > Any help out there?
    >
    > Thanks very much.
    >
    > -KF
    >
     
    Steve C. Orr [MVP, MCSD], Aug 17, 2005
    #2
    1. Advertising

  3. Guest

    Guest Guest

    Thank you very much, Steve, that's quite helpful.

    Does anyone have additional examples, or a C# example that I could look at?

    Thanks
    -KF


    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > This BarGraph web control contains a collection of Bar objects.
    > Full source code is included:
    > http://www.SteveOrr.net/articles/BarGraphs.aspx
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    > <> wrote in message
    > news:...
    >> Trying to learn about manipulating collections of objects, and populating
    >> these objects dynamically from datasources. Could someone post a code
    >> sample that shows the following:
    >>
    >> Instantiating a collection object -- say, a dictionary.
    >> Populating that collection object with custom objects, say, Person. What
    >> I really want to see is how to populate the properties of those Person
    >> objects from a datasource: instantiate one Person, fill Person.FirstName,
    >> Person.LastName, Person.ID with data, iterate to the next item in the
    >> datasource, instantiate another person, fill Person.FirstName,
    >> Person.LastName...
    >>
    >> Any help out there?
    >>
    >> Thanks very much.
    >>
    >> -KF
    >>

    >
    >
     
    Guest, Aug 17, 2005
    #3
  4. Hi KF,

    Since the question you mentioned is a very specific one, instead of
    searching some separate articles, I've made a simple test page which build
    a dummy datatable and populate a "person" class's instance collection from
    the datatable and bind it to a datagrid for displaying, below is the
    completet code. Also, I think you can try have a look in the www. asp.net
    or codeproject site to see whether there are any good examples or articles
    there.

    Hope helps,

    ========aspx============
    <HTML>
    <HEAD>
    <title>objectPopulate</title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema"
    content="http://schemas.microsoft.com/intellisense/ie5">
    </HEAD>
    <body>
    <form id="Form1" method="post" runat="server">
    <asp:DataGrid id="DataGrid1" runat="server"></asp:DataGrid>
    </form>
    </body>
    </HTML>


    ========code behind============
    namespace DemoWebApp
    {
    public class objectPopulate : System.Web.UI.Page
    {
    protected System.Web.UI.WebControls.DataGrid DataGrid1;

    private void Page_Load(object sender, System.EventArgs e)
    {
    if(!IsPostBack)
    {
    DataGrid1.DataSource = GetPersons();
    DataGrid1.DataBind();
    }
    }


    private DataTable GetDataSource()
    {
    DataTable dt = new DataTable();

    dt.Columns.Add("id",typeof(long));
    dt.Columns.Add("name",typeof(string));
    dt.Columns.Add("age",typeof(int));
    dt.Columns.Add("email",typeof(string));

    for(int i=0;i<10;i++)
    {
    DataRow dr = dt.NewRow();
    dr[0] = i+1;
    dr[1] = "Name_" + dr[0];
    dr[2] = 25 + i;
    dr[3] = dr[1] + "@test.org";

    dt.Rows.Add(dr);
    }

    return dt;
    }

    private Person[] GetPersons()
    {
    DataTable dt = GetDataSource();

    Person[] persons = new Person[dt.Rows.Count];

    for(int i=0;i<persons.Length;i++)
    {
    Person person = new Person();
    person.Id = (long)dt.Rows[0];
    person.Name = (string)dt.Rows[1];
    person.Age = (int)dt.Rows[2];
    person.Email = (string)dt.Rows[3];

    persons = person;
    }

    return persons;
    }

    #region Web Form Designer generated code
    override protected void OnInit(EventArgs e)
    {
    InitializeComponent();
    base.OnInit(e);
    }

    private void InitializeComponent()
    {
    this.Load += new System.EventHandler(this.Page_Load);

    }
    #endregion
    }


    public class Person
    {
    long _id;
    string _name;
    int _age;
    string _email;

    public long Id
    {
    get
    {
    return _id;
    }
    set
    {
    _id = value;
    }
    }

    public string Name
    {
    get
    {
    return _name;
    }
    set
    {
    _name = value;
    }
    }

    public int Age
    {
    get
    {
    return _age;
    }
    set
    {
    _age = value;
    }
    }

    public string Email
    {
    get
    {
    return _email;
    }
    set
    {
    _email = value;
    }
    }


    public Person():this(0,"",20,"")
    {
    }

    public Person(long id, string name, int age, string email)
    {
    _id = id;
    _name = name;
    _age = age;
    _email = email;
    }
    }
    }

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | Reply-To: "" <>
    | From: <>
    | References: <>
    <>
    | Subject: Re: code sample wanted: creating and populating a collection of
    objects from a datasource?
    | Date: Wed, 17 Aug 2005 15:17:19 -0700
    | Lines: 44
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | X-RFC2646: Format=Flowed; Response
    | Message-ID: <#>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | NNTP-Posting-Host: idea.urel.washington.edu 128.95.9.12
    | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
    | Xref: TK2MSFTNGXA01.phx.gbl
    microsoft.public.dotnet.framework.aspnet:118752
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    |
    | Thank you very much, Steve, that's quite helpful.
    |
    | Does anyone have additional examples, or a C# example that I could look
    at?
    |
    | Thanks
    | -KF
    |
    |
    | "Steve C. Orr [MVP, MCSD]" <> wrote in message
    | news:...
    | > This BarGraph web control contains a collection of Bar objects.
    | > Full source code is included:
    | > http://www.SteveOrr.net/articles/BarGraphs.aspx
    | >
    | > --
    | > I hope this helps,
    | > Steve C. Orr, MCSD, MVP
    | > http://SteveOrr.net
    | >
    | >
    | > <> wrote in message
    | > news:...
    | >> Trying to learn about manipulating collections of objects, and
    populating
    | >> these objects dynamically from datasources. Could someone post a code
    | >> sample that shows the following:
    | >>
    | >> Instantiating a collection object -- say, a dictionary.
    | >> Populating that collection object with custom objects, say, Person.
    What
    | >> I really want to see is how to populate the properties of those Person
    | >> objects from a datasource: instantiate one Person, fill
    Person.FirstName,
    | >> Person.LastName, Person.ID with data, iterate to the next item in the
    | >> datasource, instantiate another person, fill Person.FirstName,
    | >> Person.LastName...
    | >>
    | >> Any help out there?
    | >>
    | >> Thanks very much.
    | >>
    | >> -KF
    | >>
    | >
    | >
    |
    |
    |
     
    Steven Cheng[MSFT], Aug 18, 2005
    #4
  5. Guest

    Guest Guest

    Super. Awesome. This is great. Thank you so much, Steven.

    Examples of this sort are surprisingly scarce: most online examples seem
    work directly against the data objects rather than dyamically populating
    custom objects as you've done here.

    Thanks again.
    -KF

    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > Hi KF,
    >
    > Since the question you mentioned is a very specific one, instead of
    > searching some separate articles, I've made a simple test page which build
    > a dummy datatable and populate a "person" class's instance collection from
    > the datatable and bind it to a datagrid for displaying, below is the
    > completet code. Also, I think you can try have a look in the www. asp.net
    > or codeproject site to see whether there are any good examples or articles
    > there.
    >
    > Hope helps,
    >
    > ========aspx============
    > <HTML>
    > <HEAD>
    > <title>objectPopulate</title>
    > <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    > <meta name="CODE_LANGUAGE" Content="C#">
    > <meta name="vs_defaultClientScript" content="JavaScript">
    > <meta name="vs_targetSchema"
    > content="http://schemas.microsoft.com/intellisense/ie5">
    > </HEAD>
    > <body>
    > <form id="Form1" method="post" runat="server">
    > <asp:DataGrid id="DataGrid1" runat="server"></asp:DataGrid>
    > </form>
    > </body>
    > </HTML>
    >
    >
    > ========code behind============
    > namespace DemoWebApp
    > {
    > public class objectPopulate : System.Web.UI.Page
    > {
    > protected System.Web.UI.WebControls.DataGrid DataGrid1;
    >
    > private void Page_Load(object sender, System.EventArgs e)
    > {
    > if(!IsPostBack)
    > {
    > DataGrid1.DataSource = GetPersons();
    > DataGrid1.DataBind();
    > }
    > }
    >
    >
    > private DataTable GetDataSource()
    > {
    > DataTable dt = new DataTable();
    >
    > dt.Columns.Add("id",typeof(long));
    > dt.Columns.Add("name",typeof(string));
    > dt.Columns.Add("age",typeof(int));
    > dt.Columns.Add("email",typeof(string));
    >
    > for(int i=0;i<10;i++)
    > {
    > DataRow dr = dt.NewRow();
    > dr[0] = i+1;
    > dr[1] = "Name_" + dr[0];
    > dr[2] = 25 + i;
    > dr[3] = dr[1] + "@test.org";
    >
    > dt.Rows.Add(dr);
    > }
    >
    > return dt;
    > }
    >
    > private Person[] GetPersons()
    > {
    > DataTable dt = GetDataSource();
    >
    > Person[] persons = new Person[dt.Rows.Count];
    >
    > for(int i=0;i<persons.Length;i++)
    > {
    > Person person = new Person();
    > person.Id = (long)dt.Rows[0];
    > person.Name = (string)dt.Rows[1];
    > person.Age = (int)dt.Rows[2];
    > person.Email = (string)dt.Rows[3];
    >
    > persons = person;
    > }
    >
    > return persons;
    > }
    >
    > #region Web Form Designer generated code
    > override protected void OnInit(EventArgs e)
    > {
    > InitializeComponent();
    > base.OnInit(e);
    > }
    >
    > private void InitializeComponent()
    > {
    > this.Load += new System.EventHandler(this.Page_Load);
    >
    > }
    > #endregion
    > }
    >
    >
    > public class Person
    > {
    > long _id;
    > string _name;
    > int _age;
    > string _email;
    >
    > public long Id
    > {
    > get
    > {
    > return _id;
    > }
    > set
    > {
    > _id = value;
    > }
    > }
    >
    > public string Name
    > {
    > get
    > {
    > return _name;
    > }
    > set
    > {
    > _name = value;
    > }
    > }
    >
    > public int Age
    > {
    > get
    > {
    > return _age;
    > }
    > set
    > {
    > _age = value;
    > }
    > }
    >
    > public string Email
    > {
    > get
    > {
    > return _email;
    > }
    > set
    > {
    > _email = value;
    > }
    > }
    >
    >
    > public Person():this(0,"",20,"")
    > {
    > }
    >
    > public Person(long id, string name, int age, string email)
    > {
    > _id = id;
    > _name = name;
    > _age = age;
    > _email = email;
    > }
    > }
    > }
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    > --------------------
    > | Reply-To: "" <>
    > | From: <>
    > | References: <>
    > <>
    > | Subject: Re: code sample wanted: creating and populating a collection of
    > objects from a datasource?
    > | Date: Wed, 17 Aug 2005 15:17:19 -0700
    > | Lines: 44
    > | X-Priority: 3
    > | X-MSMail-Priority: Normal
    > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    > | X-RFC2646: Format=Flowed; Response
    > | Message-ID: <#>
    > | Newsgroups: microsoft.public.dotnet.framework.aspnet
    > | NNTP-Posting-Host: idea.urel.washington.edu 128.95.9.12
    > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
    > | Xref: TK2MSFTNGXA01.phx.gbl
    > microsoft.public.dotnet.framework.aspnet:118752
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    > |
    > | Thank you very much, Steve, that's quite helpful.
    > |
    > | Does anyone have additional examples, or a C# example that I could look
    > at?
    > |
    > | Thanks
    > | -KF
    > |
    > |
    > | "Steve C. Orr [MVP, MCSD]" <> wrote in message
    > | news:...
    > | > This BarGraph web control contains a collection of Bar objects.
    > | > Full source code is included:
    > | > http://www.SteveOrr.net/articles/BarGraphs.aspx
    > | >
    > | > --
    > | > I hope this helps,
    > | > Steve C. Orr, MCSD, MVP
    > | > http://SteveOrr.net
    > | >
    > | >
    > | > <> wrote in message
    > | > news:...
    > | >> Trying to learn about manipulating collections of objects, and
    > populating
    > | >> these objects dynamically from datasources. Could someone post a code
    > | >> sample that shows the following:
    > | >>
    > | >> Instantiating a collection object -- say, a dictionary.
    > | >> Populating that collection object with custom objects, say, Person.
    > What
    > | >> I really want to see is how to populate the properties of those
    > Person
    > | >> objects from a datasource: instantiate one Person, fill
    > Person.FirstName,
    > | >> Person.LastName, Person.ID with data, iterate to the next item in the
    > | >> datasource, instantiate another person, fill Person.FirstName,
    > | >> Person.LastName...
    > | >>
    > | >> Any help out there?
    > | >>
    > | >> Thanks very much.
    > | >>
    > | >> -KF
    > | >>
    > | >
    > | >
    > |
    > |
    > |
    >
     
    Guest, Aug 18, 2005
    #5
  6. You're welcome KF,

    Glad that it is of assistance. :)

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | Reply-To: "" <>
    | From: <>
    | References: <>
    <>
    <#>
    <>
    | Subject: Re: code sample wanted: creating and populating a collection of
    objects from a datasource?
    | Date: Wed, 17 Aug 2005 20:45:54 -0700
    | Lines: 268
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | X-RFC2646: Format=Flowed; Original
    | Message-ID: <>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | NNTP-Posting-Host: idea.urel.washington.edu 128.95.9.12
    | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
    | Xref: TK2MSFTNGXA01.phx.gbl
    microsoft.public.dotnet.framework.aspnet:118790
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    |
    | Super. Awesome. This is great. Thank you so much, Steven.
    |
    | Examples of this sort are surprisingly scarce: most online examples seem
    | work directly against the data objects rather than dyamically populating
    | custom objects as you've done here.
    |
    | Thanks again.
    | -KF
    |
    | "Steven Cheng[MSFT]" <> wrote in message
    | news:...
    | > Hi KF,
    | >
    | > Since the question you mentioned is a very specific one, instead of
    | > searching some separate articles, I've made a simple test page which
    build
    | > a dummy datatable and populate a "person" class's instance collection
    from
    | > the datatable and bind it to a datagrid for displaying, below is the
    | > completet code. Also, I think you can try have a look in the www.
    asp.net
    | > or codeproject site to see whether there are any good examples or
    articles
    | > there.
    | >
    | > Hope helps,
    | >
    | > ========aspx============
    | > <HTML>
    | > <HEAD>
    | > <title>objectPopulate</title>
    | > <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    | > <meta name="CODE_LANGUAGE" Content="C#">
    | > <meta name="vs_defaultClientScript" content="JavaScript">
    | > <meta name="vs_targetSchema"
    | > content="http://schemas.microsoft.com/intellisense/ie5">
    | > </HEAD>
    | > <body>
    | > <form id="Form1" method="post" runat="server">
    | > <asp:DataGrid id="DataGrid1" runat="server"></asp:DataGrid>
    | > </form>
    | > </body>
    | > </HTML>
    | >
    | >
    | > ========code behind============
    | > namespace DemoWebApp
    | > {
    | > public class objectPopulate : System.Web.UI.Page
    | > {
    | > protected System.Web.UI.WebControls.DataGrid DataGrid1;
    | >
    | > private void Page_Load(object sender, System.EventArgs e)
    | > {
    | > if(!IsPostBack)
    | > {
    | > DataGrid1.DataSource = GetPersons();
    | > DataGrid1.DataBind();
    | > }
    | > }
    | >
    | >
    | > private DataTable GetDataSource()
    | > {
    | > DataTable dt = new DataTable();
    | >
    | > dt.Columns.Add("id",typeof(long));
    | > dt.Columns.Add("name",typeof(string));
    | > dt.Columns.Add("age",typeof(int));
    | > dt.Columns.Add("email",typeof(string));
    | >
    | > for(int i=0;i<10;i++)
    | > {
    | > DataRow dr = dt.NewRow();
    | > dr[0] = i+1;
    | > dr[1] = "Name_" + dr[0];
    | > dr[2] = 25 + i;
    | > dr[3] = dr[1] + "@test.org";
    | >
    | > dt.Rows.Add(dr);
    | > }
    | >
    | > return dt;
    | > }
    | >
    | > private Person[] GetPersons()
    | > {
    | > DataTable dt = GetDataSource();
    | >
    | > Person[] persons = new Person[dt.Rows.Count];
    | >
    | > for(int i=0;i<persons.Length;i++)
    | > {
    | > Person person = new Person();
    | > person.Id = (long)dt.Rows[0];
    | > person.Name = (string)dt.Rows[1];
    | > person.Age = (int)dt.Rows[2];
    | > person.Email = (string)dt.Rows[3];
    | >
    | > persons = person;
    | > }
    | >
    | > return persons;
    | > }
    | >
    | > #region Web Form Designer generated code
    | > override protected void OnInit(EventArgs e)
    | > {
    | > InitializeComponent();
    | > base.OnInit(e);
    | > }
    | >
    | > private void InitializeComponent()
    | > {
    | > this.Load += new System.EventHandler(this.Page_Load);
    | >
    | > }
    | > #endregion
    | > }
    | >
    | >
    | > public class Person
    | > {
    | > long _id;
    | > string _name;
    | > int _age;
    | > string _email;
    | >
    | > public long Id
    | > {
    | > get
    | > {
    | > return _id;
    | > }
    | > set
    | > {
    | > _id = value;
    | > }
    | > }
    | >
    | > public string Name
    | > {
    | > get
    | > {
    | > return _name;
    | > }
    | > set
    | > {
    | > _name = value;
    | > }
    | > }
    | >
    | > public int Age
    | > {
    | > get
    | > {
    | > return _age;
    | > }
    | > set
    | > {
    | > _age = value;
    | > }
    | > }
    | >
    | > public string Email
    | > {
    | > get
    | > {
    | > return _email;
    | > }
    | > set
    | > {
    | > _email = value;
    | > }
    | > }
    | >
    | >
    | > public Person():this(0,"",20,"")
    | > {
    | > }
    | >
    | > public Person(long id, string name, int age, string email)
    | > {
    | > _id = id;
    | > _name = name;
    | > _age = age;
    | > _email = email;
    | > }
    | > }
    | > }
    | >
    | > Steven Cheng
    | > Microsoft Online Support
    | >
    | > Get Secure! www.microsoft.com/security
    | > (This posting is provided "AS IS", with no warranties, and confers no
    | > rights.)
    | > --------------------
    | > | Reply-To: "" <>
    | > | From: <>
    | > | References: <>
    | > <>
    | > | Subject: Re: code sample wanted: creating and populating a collection
    of
    | > objects from a datasource?
    | > | Date: Wed, 17 Aug 2005 15:17:19 -0700
    | > | Lines: 44
    | > | X-Priority: 3
    | > | X-MSMail-Priority: Normal
    | > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | > | X-RFC2646: Format=Flowed; Response
    | > | Message-ID: <#>
    | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | > | NNTP-Posting-Host: idea.urel.washington.edu 128.95.9.12
    | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
    | > | Xref: TK2MSFTNGXA01.phx.gbl
    | > microsoft.public.dotnet.framework.aspnet:118752
    | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    | > |
    | > | Thank you very much, Steve, that's quite helpful.
    | > |
    | > | Does anyone have additional examples, or a C# example that I could
    look
    | > at?
    | > |
    | > | Thanks
    | > | -KF
    | > |
    | > |
    | > | "Steve C. Orr [MVP, MCSD]" <> wrote in message
    | > | news:...
    | > | > This BarGraph web control contains a collection of Bar objects.
    | > | > Full source code is included:
    | > | > http://www.SteveOrr.net/articles/BarGraphs.aspx
    | > | >
    | > | > --
    | > | > I hope this helps,
    | > | > Steve C. Orr, MCSD, MVP
    | > | > http://SteveOrr.net
    | > | >
    | > | >
    | > | > <> wrote in message
    | > | > news:...
    | > | >> Trying to learn about manipulating collections of objects, and
    | > populating
    | > | >> these objects dynamically from datasources. Could someone post a
    code
    | > | >> sample that shows the following:
    | > | >>
    | > | >> Instantiating a collection object -- say, a dictionary.
    | > | >> Populating that collection object with custom objects, say, Person.
    | > What
    | > | >> I really want to see is how to populate the properties of those
    | > Person
    | > | >> objects from a datasource: instantiate one Person, fill
    | > Person.FirstName,
    | > | >> Person.LastName, Person.ID with data, iterate to the next item in
    the
    | > | >> datasource, instantiate another person, fill Person.FirstName,
    | > | >> Person.LastName...
    | > | >>
    | > | >> Any help out there?
    | > | >>
    | > | >> Thanks very much.
    | > | >>
    | > | >> -KF
    | > | >>
    | > | >
    | > | >
    | > |
    | > |
    | > |
    | >
    |
    |
    |
     
    Steven Cheng[MSFT], Aug 18, 2005
    #6
    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. Harvey
    Replies:
    0
    Views:
    792
    Harvey
    Jul 16, 2004
  2. Harvey
    Replies:
    1
    Views:
    899
    Daniel
    Jul 16, 2004
  3. Jake
    Replies:
    0
    Views:
    606
  4. Øyvind Isaksen
    Replies:
    1
    Views:
    1,033
    Øyvind Isaksen
    May 18, 2007
  5. Siegfried Heintze

    Wanted: Exotic databound Datagrid Sample code

    Siegfried Heintze, Sep 23, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    118
    Siegfried Heintze
    Sep 23, 2003
Loading...

Share This Page