473,587 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Grid setup - dataset -multiple tables

Hi all,
I have now correctly set up my dataset and two grids, so that the parent
navigates the child.
THe thing is that the child table is actually a lookup type table. It lists
billing types for the parent table, so that I just store a key in the parent
table, and the show the billing type description from the child
I need to set this up in one grid. I have played arround with the tables and
columns collection in the ID, but cant seem to get the child table
desciption clumn in the grid. I would really appreciate some guidence on how
to do this in the VS IDE.

Thanks
Robert
Jan 13 '06 #1
4 2087
Robert,

The datatatableadap ter plus all the design time parts around that in VS2005
is completely new.

Most of us where us used to do the things you ask completely in code (while
there was no datagridview as well). If the design part in VS2003 was correct
the design part was probably not changed. (Under the hood of the
datatableadapte r is a lot working the same as in VS2003).

VS2005 is released now 2 months ago, don't expect to much expirience answers
using the designers. Before those with expirience leave the code part (if
they do that) will in my idea take some time.

On the otherhand the datagridview is not an easy control to handle in code.
So you are ahead now, with all the things that belong by being ahead, you
have to investigate a lot yourself.

Just some thoughts.

Cor
Jan 13 '06 #2
Hi,

"Robert Bravery" <me@u.com> wrote in message
news:O9******** ******@tk2msftn gp13.phx.gbl...
Hi all,
I have now correctly set up my dataset and two grids, so that the parent
navigates the child.
THe thing is that the child table is actually a lookup type table.
In a lookup scenario there is a master and lookup table. Keep in mind that
this is the opposite of parent-child. The lookup table is actually the
parent where the master table is the child.

May sound confusing, but consider the following: suppose you have a
BillingTypes Table and a Invoice Table, then the BillingTypes is the
lookup-table and therefore also parent, because one BillingType may have
many Invoice's with that BillingType.
It lists billing types for the parent table, so that I just store a key in
the parent
table, and the show the billing type description from the child
I need to set this up in one grid. I have played arround with the tables
and
columns collection in the ID, but cant seem to get the child table
desciption clumn in the grid.
Assuming that BillingTypes is a lookup table then you have two choices:

- Either show the Invoice table inside the grid and replace the fk column
inside the DataGrid with a DataGridComboBo xColumn. The
DataGridComboBo xColumn would also be connected with the BillingType table to
show a description and allow the user to select a different BillingType.
DataGridComboBo xColumn is unfortunately not included in NET1.1, you will
have to search the internet for sourcecode.

- Create the right relation, where BillingType is the parent. Then you can
add expression columns to your child table Invoices that uses fields from
the parent BillingTypes.

HTH,
Greetings
I would really appreciate some guidence on how
to do this in the VS IDE.

Thanks
Robert

Jan 13 '06 #3
HI Bart,

I see where you going with this, but surley the, in my case, worktime should
be the parent, as it is the navigating table. I might have 5000 records in
worktime, but only 5 in billtype, which is the lookup. If I make lookup the
parent int the relation, then my primary navigation will only be 5 records.
No matter what I try with the table and column collection I can get this
right. All I want to do is show the billtype description in the grid inplace
of the FK billid
In dBASE this is so simple, whether I cant get my mind around .net or
whether I am doing something completely wron I don't know, BUT I need help

Thanks
Robert

"Bart Mermuys" <bm************ *@hotmail.com> wrote in message
news:e3******** ******@tk2msftn gp13.phx.gbl...
Hi,

"Robert Bravery" <me@u.com> wrote in message
news:O9******** ******@tk2msftn gp13.phx.gbl...
Hi all,
I have now correctly set up my dataset and two grids, so that the parent
navigates the child.
THe thing is that the child table is actually a lookup type table.
In a lookup scenario there is a master and lookup table. Keep in mind

that this is the opposite of parent-child. The lookup table is actually the
parent where the master table is the child.

May sound confusing, but consider the following: suppose you have a
BillingTypes Table and a Invoice Table, then the BillingTypes is the
lookup-table and therefore also parent, because one BillingType may have
many Invoice's with that BillingType.
It lists billing types for the parent table, so that I just store a key inthe parent
table, and the show the billing type description from the child
I need to set this up in one grid. I have played arround with the tables
and
columns collection in the ID, but cant seem to get the child table
desciption clumn in the grid.
Assuming that BillingTypes is a lookup table then you have two choices:

- Either show the Invoice table inside the grid and replace the fk column
inside the DataGrid with a DataGridComboBo xColumn. The
DataGridComboBo xColumn would also be connected with the BillingType table

to show a description and allow the user to select a different BillingType.
DataGridComboBo xColumn is unfortunately not included in NET1.1, you will
have to search the internet for sourcecode.

- Create the right relation, where BillingType is the parent. Then you can add expression columns to your child table Invoices that uses fields from
the parent BillingTypes.

HTH,
Greetings
I would really appreciate some guidence on how
to do this in the VS IDE.

Thanks
Robert


Jan 13 '06 #4
Hi Robert,

"Robert Bravery" <me@u.com> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
HI Bart,

I see where you going with this, but surley the, in my case, worktime
should
be the parent, as it is the navigating table. I might have 5000 records in
worktime, but only 5 in billtype, which is the lookup. If I make lookup
the
parent int the relation,
then my primary navigation will only be 5 records.
You only want to show one table so who says the parent must be the
navigating table, no in your case the child table is the navigating table
and the parent table (lookup) is not shown, it's only used to lookup values.
No matter what I try with the table and column collection I can get this
right. All I want to do is show the billtype description in the grid
inplace
of the FK billid
I already suggested two options, let my clarify the second option (which
doesn't use a ComboBoxColumn) .

Suppose there is a worktime table which has a foreign key column to the
billtype table which is the lookup, the billtype table has a description
column or something like that.

Add the billtype and worktime table to a typed DataSet (anyway you do it),
then open the DataSet schema designer and make sure there is a relation
between them as follows:
Name: billtype_workti me
Parent: billtype - bill_id (pk)
Child: worktime - bill_id (fk)

Now, once you have this relation, go to the worktime table (still inside
DataSet schema designer), add a column to it by typing into it, name the
column something like "BillType" and choose a string as datatype. Then open
the properties window (make sure the new column remains selected) and then
set the property Expression to "Parent(billtyp e_worktime).des cription"
(without the quotes).

(billtype_workt ime= name relation and description= a field from billtype)

Save and compile.

Put an instance of this DataSet on a Form, make sure there are two correct
DataAdapter configured. Then place a DataGrid on the Form and configure as
follows:
DataGrid
DataSource = yourDataSetOnTh eForm
DataMember = "worktime"

That's it, now you should see the worktime table (child) with an extra
column "BillType" which shows you the description field out of the billtype
table (parent).
In dBASE this is so simple, whether I cant get my mind around .net or
whether I am doing something completely wron I don't know, BUT I need help
But you can't really compare both, VS2005 can be used for a wide range of
applications, while it does have DB support (UI and otherwise) it's in many
cases harder to setup an UI then it is with a database application like
access or dbase.

HTH,
Greetings

Thanks
Robert

"Bart Mermuys" <bm************ *@hotmail.com> wrote in message
news:e3******** ******@tk2msftn gp13.phx.gbl...
Hi,

"Robert Bravery" <me@u.com> wrote in message
news:O9******** ******@tk2msftn gp13.phx.gbl...
> Hi all,
> I have now correctly set up my dataset and two grids, so that the
> parent
> navigates the child.
> THe thing is that the child table is actually a lookup type table.


In a lookup scenario there is a master and lookup table. Keep in mind

that
this is the opposite of parent-child. The lookup table is actually the
parent where the master table is the child.

May sound confusing, but consider the following: suppose you have a
BillingTypes Table and a Invoice Table, then the BillingTypes is the
lookup-table and therefore also parent, because one BillingType may have
many Invoice's with that BillingType.
>It lists billing types for the parent table, so that I just store a key in >the parent
> table, and the show the billing type description from the child
> I need to set this up in one grid. I have played arround with the
> tables
> and
> columns collection in the ID, but cant seem to get the child table
> desciption clumn in the grid.


Assuming that BillingTypes is a lookup table then you have two choices:

- Either show the Invoice table inside the grid and replace the fk column
inside the DataGrid with a DataGridComboBo xColumn. The
DataGridComboBo xColumn would also be connected with the BillingType table

to
show a description and allow the user to select a different BillingType.
DataGridComboBo xColumn is unfortunately not included in NET1.1, you will
have to search the internet for sourcecode.

- Create the right relation, where BillingType is the parent. Then you

can
add expression columns to your child table Invoices that uses fields from
the parent BillingTypes.

HTH,
Greetings
>I would really appreciate some guidence on how
> to do this in the VS IDE.
>
> Thanks
> Robert
>
>



Jan 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2165
by: Jim H | last post by:
We ahve a .NET web page that we dynamically create a bunch of DataGrids and add them to a place holder. When the user hits submit we need to go through all of the DataGrids to get some data. We can't seem to find the grids on the post back, the PlaceHolder.Controls.Count is 0. How do we get that data back. The DataGrids have check boxes...
4
2834
by: Filippo Pandiani | last post by:
I have a grid that shows the file list from a folder. On the postback, how do I get a Dataset from this grid? Thanks, Filippo.
2
1103
by: Filippo Pandiani | last post by:
I have a grid that shows the file list from a folder. On the postback, how do I get a Dataset from this grid? Thanks, Filippo.
4
2320
by: Vasantha peddireddy | last post by:
I am posting a page to another page (form post). The data grid on the second page is being populated with data. Now, on page load of the second page, I would like to send the grid data on this page to the first page and populate the grid on the first page with the same data on second page. Please let me know how can I do this. Thanks,...
0
814
by: Rich Wallace | last post by:
Hi all... I have a web form that I load as my Default.aspx which has a data grid on it that I will populate from a SQL Server dataset once the user runs a query. The grid is formatted in a way where it takes up 3/4 of the form and what I'd like to do is show the grid before I have any data to bind to it as the grid contains the UI based...
2
2662
by: Marty | last post by:
Hi, Let's say that I bind a grid to a dataset populated from the content of a DB table. 1- Does this grid will be updated if the content of the DB table is modified? 2- Does DB table content can be modified by the grid content?
3
2591
by: Charles Law | last post by:
This is driving me mad. Can someone please put me out of my misery? I have a DataSet which I wish to use as the data source for a grid control (it is actually an Infragistics grid). When I assign to the DataSource property like this UltraGrid1.DataSource = MyDataSet I get the following exception:
1
1928
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
I'm working in Visual Studio 2005 and C#. I have a DataSet, a Binding Source, and a grid. I'm finding that if a table in the DataSet gets updated from the Database, the new data doesn't appear in the grid until after the user clicks the grid. After the DataSet update from the DataBase, I've tried Rebind() on the grid, and ResetBindings on...
4
2553
by: =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post by:
Hi All, I have an application that fetch data thru a store proc and display in a datagrid, but after successful execution of proc the data grid is not visible.Please go thru the following code and plz let me know what is missing.The data grid propertiy "Visible is true". try { OracleDataAccess oracleDA = new OracleDataAccess("Data
0
1155
by: newsaboutgod | last post by:
I am loading a dataset from a XML file. I want to allow the user to display data from the dataset in a grid. Depending on which button they click i want to load the grid with a subset of data from the dataset. So, once I load the dataset from the XML file, how would I load the grid with only the data from the dataset that had "smith" in...
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.