Bob
Thu Aug 07 14:32:18 CDT 2003
Yes, your description below is accurate. I understand that clicking the +
displays the Relationship Name, which must be clicked to display the
details. THis is default behavior and cannot really be changed.
Here are other questions (re-worded from original).
Question 2 - How can you tell if the child rows for a specific parent row
are displayed?
I would expect "if mygrid.isexpanded(Row0) = true" to tell me that
the datagrid for row 0 is expanded and the child rows are displayed. It
does not. It only tells me that "Display Details" is visible or not.
Toggling
mygrid.expanded and mygrid.collapsed. simply displays or doesn't display the
"Display Details" option. This is pretty useless. How can I determine if a
Parent row is displaying the child rows or not?
Question 3 - With a Parent row expanded to display child rows, how do I
modify the Parent row? You would think that simply modifying the
corresponding DataSet column value would accomplish this, but this generates
an error that I cannot make sense out of. How do you update a Parent Row
while it is expanded shows related child rows?
Question 4 - Updating a Parent row column value (not a column used in
creating the parent/child relationship) seems to always collapse the child
rows for that parent row. Is there a way around this?
Question 5 - Adding child rows to the DataSet does not display them in the
datagrid if the screen is already full with previously child rows. You can,
of course, scroll down to see it. How would you make the last child row
added visible?
Thanks for your help.
Bob
"Ying-Shen Yu" <v-yiy@online.microsoft.com> wrote in message
news:1QAalBOXDHA.1360@cpmsftngxa06.phx.gbl...
> Hello Bob,
> I'm afraid I'm not quite clear about your description. Let me repeat
it,
>
> You have two tables in a dataset schema, and there a relation between
> the two tables, the datagrid displays the master
> table at first, then if you click the '+' next to the item, the grid will
> show you the relation name, and if you click
> on the relation name, the (whole) grid will navigate to the child
> table(ofcourse showing the records related
> to the master record only).
>
> If the behaviors you want is same as my repeated above, I think it's
> the default implemention of the Winform datagrid on
> master-detail relationship presentation. For how to implement this effect,
> you may refer to the following links:
>
> 308454 HOW TO: Display Parent and Child Fields Together in a DataGrid by
> Using VisualBasic.NET
>
http://support.microsoft.com/?id=308454
>
> or
>
> 308057 HOW TO: Display Parent and Child Fields Together in a Windows Forms
> by Using C#.NET
>
http://support.microsoft.com/?id=308057
>
> However, I remember that you said in the first mail question-1 that
you
> want to get rid of the procedure of
> clicking on the relation name and expand the related items in child table
> directly, when there is only one relation defined.
> I've sent my current implemention to your e-mailbox, maybe you can give me
> some more descriptions about the effect you wish to have. I'll be happy to
> put it onto the wishlist if it's really a good idea.
>
> But If you don't want the default behaviors of the treenode, I'm
afraid
> you couldn't customize it by yourself in current
> version of DataGrid. The reason is same as I mentioned in my last reply.
>
> Be free to let me know if you have any questions on this issue,
Thanks!
>
>
> Kind regards,
>
> Ying-Shen Yu [MSFT]
> Microsoft Support Engineer
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. 2001 Microsoft Corporation. All rights
> reserved.
>
>
>
>
>
> From: "Bob Day" <BobDay@TouchTalk.net>
> Subject: Re: DataGrid questions
> Date: Wed, 6 Aug 2003 11:48:36 -0500
> Newsgroups: microsoft.public.dotnet.framework.windowsforms
>
> No, it would look like this:
> + LineNo LineSummary
> 1 Play Message
> -----------------------------------
> Now click the + button, and you get:
> - LineNo LineSummary
> | 1 Play Message
> |------> Display Details (which is underlined)
> ----------------------------------------------
> Now click Display Details and you get the details
> Line No Summary Detail
> 1 Play Message File Name: Greeting.wave
> -----------------------------------------------
>
> As far as I can see, this is a very straight forward use of a datagrid and
> Parent/Child relationships, so I don't understand why the commands
> surrounding it aren't ituitieve (i.e. my original questions about above).
>
> Any help would be appreciated.
>
> Thanks!
> Bob Day
>
> "Jonny" <jonnyyu@pub.xaonline.com> wrote in message
> news:%23625kLxWDHA.2476@tk2msftngp13.phx.gbl...
> > Hello Bob,
> > Do you mean the effect like this?
> >
> > + LineNo LineDescription
> > | 1 a Line
> > --StatusNo Status
> > 1 Playing
> > 2 Idle
> >
> > To implement this effect, I think you need an event like
> > OnTreeNodeExpanding and some methods to create the child datagrid by
> > yourself.
> > Unfortunately, the Datagrid component neither had a property to
change
> > the behavior of the tree node, nor offered a method/event to override
it.
> it
> > may not be possible to implement this effect.
> >
> > Regards,
> > Ying Shen Yu
> > Microsoft Partner Online Support
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > "Bob Day" <BobDay@TouchTalk.net> wrote in message
> > news:uYNlg0HWDHA.2040@TK2MSFTNGP11.phx.gbl...
> > > using VS 2003, Vb.net...
> > >
> > > In a WinForm, I have a datagrid with a parent child relationship named
> > > "Display Details". When you click on the + next to the Parent row,
> below
> > it
> > > you get "Display Details" -
> > > when you click on that, you get the related child rows of the Parent
> row.
> > > Everything
> > > displays correctly.
> > >
> > > The parent row represents a telephone line (1,2,3 etc) and the child
row
> > > represents what is happening real time on that line (Parent Line 1,
> Child
> > > Row 1 - Playing Greeting, etc.). So rows are constantly being added
to
> > the
> > > child rows (i.e. the dataset) (whether displayed or not).
> > >
> > > Question 1 - The "Display Details" seems non-standard windows
> programming.
> > > When you click a + next to an item, you expect to expand what ever is
> > under
> > > it. Is there any way to get rid of the "Display Details" and just
> > > automatically expand to the child rows? There is only this one
relation
> > in
> > > the collection.
> > >
> > > Question 2 - I would expect "if mygrid.isexpanded(0) = true" to tell
me
> > that
> > > the datagrid for row 0 is expanded and the child rows are displayed.
It
> > > does not.
> > > It only tells me that "Display Details" is visible or not. Toggling
> > > mygrid.expanded and mygrid.collapsed. simply displays or doesn't
display
> > the
> > > "Display Details" option. This is pretty useless. How can I
determine
> if
> > a
> > > Parent row is displaying the child rows or not?
> > >
> > > Question 3 - With a Parent row expanded to display child rows, how do
I
> > > modify the Parent row? You would think that simply modifying the
> > > corresponding DataSet column value would accomplish this, but this
> > generates
> > > an error that I cannot make sense out of. How do you update a Parent
> Row
> > > while it is expanded shows related child rows?
> > >
> > > Question 4 - Updating a Parent row column value(not a column used in
> > > creating the parent/child relationship) seems to always collapse the
> child
> > > rows for that parent row. Is there a way around this?
> > >
> > > Question 5 - Adding child rows to the DataSet does not display them in
> the
> > > datagrid if the screen is already full with previously child rows.
You
> > can,
> > > of course, scroll down to see it. How would you make the last child
row
> > > added visible?
> > >
> > > Thanks for your help.
> > > Bob
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>
>