Are there any non data bound controls left?

Discussion in 'ASP .Net' started by cr113, Oct 26, 2007.

  1. cr113

    cr113 Guest

    I'm trying to convert a windows app to ASP.NET using VS2005. I have
    some web experience, but not much. 99% of the time if I need to
    display data in a table in my windows apps I use a ListView object and
    populate it manually using code like this:

    ListView1.Items.Add("Jones")
    ListView1.Items(ListView1.Items.Count - 1).SubItems.Add("123")

    The result of this code would be a row added to the ListView like
    this:

    Jones 123


    I have had terrible luck with data bound objects. I hate not having
    manual control. There always seems to be a case where a simple SQL
    statement is not enough to populate my ListView object (crazy users
    maybe?). Am I the only one who likes populating list objects manually?

    Anyway here's my question. I'm wondering if there is an ASP.NET
    control in VS2005 that works similar to the ListView object (found in
    VS2005 Windows Application) and will allow me to manually populate the
    list without data binding. Maybe the GridView or the DataList?
     
    cr113, Oct 26, 2007
    #1
    1. Advertisements

  2. cr113

    bruce barker Guest

    see HtmlTable class, for generics solution. you can also just build a
    datatable on the fly or use the ObjectDataSource to map to your own object.


    -- bruce (sqlwork.com)

    cr113 wrote:
    > I'm trying to convert a windows app to ASP.NET using VS2005. I have
    > some web experience, but not much. 99% of the time if I need to
    > display data in a table in my windows apps I use a ListView object and
    > populate it manually using code like this:
    >
    > ListView1.Items.Add("Jones")
    > ListView1.Items(ListView1.Items.Count - 1).SubItems.Add("123")
    >
    > The result of this code would be a row added to the ListView like
    > this:
    >
    > Jones 123
    >
    >
    > I have had terrible luck with data bound objects. I hate not having
    > manual control. There always seems to be a case where a simple SQL
    > statement is not enough to populate my ListView object (crazy users
    > maybe?). Am I the only one who likes populating list objects manually?
    >
    > Anyway here's my question. I'm wondering if there is an ASP.NET
    > control in VS2005 that works similar to the ListView object (found in
    > VS2005 Windows Application) and will allow me to manually populate the
    > list without data binding. Maybe the GridView or the DataList?
    >
     
    bruce barker, Oct 26, 2007
    #2
    1. Advertisements

  3. cr113

    Andrew Faust Guest

    You could always manually create a data set that matches the criteria you
    need and then bind to that.

    --
    Andrew Faust
    andrew[at]andrewfaust.com
    http://www.andrewfaust.com


    "cr113" <> wrote in message
    news:...
    > I'm trying to convert a windows app to ASP.NET using VS2005. I have
    > some web experience, but not much. 99% of the time if I need to
    > display data in a table in my windows apps I use a ListView object and
    > populate it manually using code like this:
    >
    > ListView1.Items.Add("Jones")
    > ListView1.Items(ListView1.Items.Count - 1).SubItems.Add("123")
    >
    > The result of this code would be a row added to the ListView like
    > this:
    >
    > Jones 123
    >
    >
    > I have had terrible luck with data bound objects. I hate not having
    > manual control. There always seems to be a case where a simple SQL
    > statement is not enough to populate my ListView object (crazy users
    > maybe?). Am I the only one who likes populating list objects manually?
    >
    > Anyway here's my question. I'm wondering if there is an ASP.NET
    > control in VS2005 that works similar to the ListView object (found in
    > VS2005 Windows Application) and will allow me to manually populate the
    > list without data binding. Maybe the GridView or the DataList?
    >
     
    Andrew Faust, Oct 27, 2007
    #3
  4. cr113

    cr113 Guest

    On Oct 26, 7:19 pm, "Andrew Faust" <> wrote:

    > You could always manually create a data set that matches the criteria you
    > need and then bind to that.



    That sounds promising. I was wondering if you could do that.

    Thanks!

    Chuck.
     
    cr113, Oct 29, 2007
    #4
    1. Advertisements

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. senthil
    Replies:
    0
    Views:
    538
    senthil
    Mar 4, 2004
  2. sunil panda

    Lower bound & Upper bound

    sunil panda, Dec 25, 2003, in forum: Java
    Replies:
    9
    Views:
    7,469
    thushara wijeratna
    Oct 7, 2008
  3. Rhiner Dan
    Replies:
    1
    Views:
    804
    Mike Wahler
    Mar 27, 2005
  4. Mario Krsnic
    Replies:
    0
    Views:
    434
    Mario Krsnic
    Jun 23, 2006
  5. Phillip Vong
    Replies:
    0
    Views:
    461
    Phillip Vong
    Jul 27, 2006
Loading...

Share This Page