multiple data grids in a same ASPX page

Discussion in 'ASP .Net Building Controls' started by Raja, Oct 15, 2003.

  1. Raja

    Raja Guest

    Hi,
    I have a requirement in which I need to display multiple
    datagrids in my ASPX page. I do not know how many of them
    until the page load.
    So I tried to approach this problem in the following ways
    but none worked.

    Method 1:
    Step 1. Create a custom web control with a datagrid in it.
    Step 2. Place a placeholder control in my page
    Step 3. Create multiple instance of custom control and add
    those to placeholder control
    This failed, beacuse when i try to access the datagrid
    control inside the custom webcontrol it gives "object
    reference.. " error

    Method2:
    step 1: have a repeater control in the form
    step 2: Inside the itemtemplate of repeater control have a
    datagrid.
    I still have questions about how to set the datasource for
    both datagrid and repeater control.

    Method 3:
    step 1: have a place holder control in the form
    step 2: create datagrid control in the form at runtime
    This method seems to be working.. but I am unable to set
    headerstyle and other properties for the dynamically
    created (at run time) datagrid. because they are all
    readonly properties.

    Could any one tell me how to do this. Do you guys think
    all of the above methods are wrong? Any code sample would
    be a great benefit.

    Thanks in advance,
    Raja
    Raja, Oct 15, 2003
    #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. James G. Beldock

    Multiple grids - how to update layout position

    James G. Beldock, Jul 24, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    404
    Saravana
    Jul 24, 2003
  2. Sriram Mallajyosula

    How do I post data from aspx page to another aspx page.

    Sriram Mallajyosula, Nov 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    957
    Steve C. Orr [MVP, MCSD]
    Nov 5, 2003
  3. =?Utf-8?B?SUdvdFlvdXJEb3ROZXQ=?=

    multiple grids on one page

    =?Utf-8?B?SUdvdFlvdXJEb3ROZXQ=?=, Jul 28, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    436
    =?Utf-8?B?SUdvdFlvdXJEb3ROZXQ=?=
    Jul 28, 2004
  4. Syed Hussain via DotNetMonster.com

    How to put multiple grids on tab strip control using asp.net

    Syed Hussain via DotNetMonster.com, Feb 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    516
    Syed Hussain via DotNetMonster.com
    Feb 9, 2005
  5. Iain Porter

    multiple grids on one page - use single Update/Edit/Cancel commands

    Iain Porter, Dec 15, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    141
    Iain Porter
    Dec 16, 2003
Loading...

Share This Page