Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

Help with Advanced Datagrid  (repost)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brad Shook - 18 Oct 2004 21:38 GMT
First of all thinks to Cor Ligthert for helping me with this last week.

If you wild like to read Cor's comments please refer to the posting from
10/14/2004 and 8:48AM "Help with Advanced Datagrid"

I am trying to bind one column of a datagrid to a seperate textbox and
the rest of the fields to a datagrid. the comments are too large to
fit in a datagrid so I created a textbox below the datagrid and need
it to hold the data for the current record selected in the datagrid.
Here is a part of the code.

'DataSetWellMobile1 is the dataset with all the data
'DGWellResults is the dtagrid I am binding the data to
'txtWellComments is the textbox that I need bound

Me.DataSetWellMobile1.Relations.Add( _
                   New DataRelation( _
                       relationName:="relWellInfo", _

parentColumn:=Me.DataSetWellMobile1.Tables("TblPeople").Columns("UniqueId"),
_

childColumn:=Me.DataSetWellMobile1.Tables("TblWellMobileInfo").Columns("Pers
onId"),
_
                       createConstraints:=True))

       Me.DGWellResults.DataBindings.Add(New Binding("DataSource",
Me.DataSetWellMobile1.TblPeople.DefaultView, "relWellInfo"))

Me.txtWellComments.DataBindings.Add(New Binding("Text",
DataSetWellMobile1.TblPeople.DefaultView, "relWellInfo.Comments"))

The code binds everything but the currency manager does not change the
textbox to the next record when I select on the next record in the
datagrid.

The data structure is

Parent Datagrid
Child Datagrid
 textbox linked to child datagrid

What am I missing.
Thanks,
Brad
Cor Ligthert - 19 Oct 2004 10:20 GMT
Brad,

I have tried this again but I cannot get the currencymanager do anything,
what related table I use or object I connect as filter to that.

I have searched Google for this and found one answer what I thought that was
about this. There was talked about a kind of bug by somebody who had
contacted Microsoft. However it was not clear if he had an answer and if the
answer did fit.

(The currencymanager stays forever on zero, a problem what I had seen before
however because of your question have again investigated).

You can go around this by not using the datarelations but the dataview with
filter, however than you have to do the adding of rows not using the *.

Maybe you can place this question as well in the newsgroup

microsoft.public.dotnet.framework.adonet

Can be that somebody there says, this is easy and than we both know the
answer because I am not as much as here however as well active in that
newsgroup.

Cor

"Brad Shook" <bshook@echd.org.removeme>

> First of all thinks to Cor Ligthert for helping me with this last week.
>
[quoted text clipped - 42 lines]
> Thanks,
> Brad
Brad Shook - 19 Oct 2004 14:21 GMT
Thanks Cor. I will post this in another group. I agree with you in that I
think this is a bug.
> Brad,
>
[quoted text clipped - 42 lines]
> >                    New DataRelation( _
> >                        relationName:="relWellInfo", _

parentColumn:=Me.DataSetWellMobile1.Tables("TblPeople").Columns("UniqueId"),
> > _

childColumn:=Me.DataSetWellMobile1.Tables("TblWellMobileInfo").Columns("Pers
> > onId"),
> > _
[quoted text clipped - 19 lines]
> > Thanks,
> > Brad

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.