Re: Nested Datagrids

Discussion in 'ASP .Net' started by Juliano Bortolozzi, Jul 14, 2003.

  1. I can imagine two possible solutions:

    1. Create your own datagrid deriving from asp.net datagrid and put this
    behavior on it (showing a special message when empty). I guess it's a more
    generic solution for the problem.

    2. write code on the OnItemCreated event of your parent datagrid and get the
    child instance from the Controls collection. At this time, you can do
    whatever you want with the child grid (hide it, for example).



    "Dave" <> wrote in message
    news:076b01c34a2b$90520790$...
    > I have a DataGrid nested within another DataGrid whose
    > DataSource is Container.DataItem.CreateChildView
    > ("RelationName"). In some cases, there will be no data
    > for the nested DataGrid and I want to display a message
    > saying that. So my questions are (1) how can I address
    > the nested DataGrid to set .Visible=false and (2) how can
    > I establish that there is no data? Normally I would just
    > interrogate the DataGrid.Items.Count but with the
    > potential for more than one of them, I'm uncertain how to
    > proceed.
    >
    > Thanks...
    Juliano Bortolozzi, Jul 14, 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. Dave

    Nested DataGrids

    Dave, Jul 15, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    613
    S. Justin Gengo
    Jul 15, 2003
  2. Dave

    Nested DataGrids

    Dave, Jul 21, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    386
    Ray Dixon [MVP]
    Jul 21, 2003
  3. Dave T

    Edit Nested Datagrids

    Dave T, Nov 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    389
    Dave T
    Nov 3, 2003
  4. ProgramAnalyst

    nested datagrids

    ProgramAnalyst, Nov 4, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    421
    ProgramAnalyst
    Nov 5, 2004
  5. David Lozzi

    SQL, XML, Nested Datagrids and the like

    David Lozzi, Oct 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    372
    Frankie
    Oct 7, 2005
Loading...

Share This Page