Data Grid and class objects..

Last post 12-13-2005 10:29 AM by Mr22. 0 replies.

Sort Posts:

  • Data Grid and class objects..

    12-13-2005, 10:29 AM
    • Member
      30 point Member
    • Mr22
    • Member since 12-05-2005, 4:32 AM
    • Posts 6

    Hi all..

    Ok, i have a user control which i want to display a grid of data in it.. i created my class objects which encapsulate all the database layer. What i now want to do is populate the datagrid from it..

    Say my datagrid template has an image button in it and a textbox.

    And, clsA  has properties Name and Phonenumber, Imagename

    and a class called clsAs which has a sub called 'populate' which goes off to the db and fills a collection of clsAs (the collection class of clsA)

    I now want to populate a datagrid.. I want the imagebutton imageurl to be bound to clsA.imagename and the text of the textbox to be bound to clsA.Name

    how do i define the <asp:datagrid> initially? Is a datagrid wrong for this type of action? I want to just use my class objects and not have to use a dataset.. is this possible? I've tried using the <% #eval %> but i dont know if i can reference my objects here? is it possible?

    Thanks in advance..

     

Page 1 of 1 (1 items)