473,396 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Coding Parctices DataGrids

Here goes...
I am very new to programming. I am currenting using Visual Studio C# to
connect to SQL db. The db has only one table and two views. I have
created 3 datagrids on one page along with 3 sqladapters and datasets.
Each adapter uses a stored procedure used with the table and two views.
I have used the views to present summary totals of regions and areas
respectively. The first datagrid displays regional summary data. This
data consists of rows showing the area offices within the region and
total items pending in each area. Clicking on the area name in a row
will trigger the second datagrid which displays information for the
area along with summary data for the offices within the area. Clicking
on the office name in this grid triggers the third datagrid with
detailed information of items within that office. I am sure doing a lot
of setting of the visible properties of these datagrids. Is there a
better/proven way to deal with something like this?

Thanks

Nov 19 '05 #1
1 983
dear keys4worship,

From the matter that you have written below, it is clear that the data in
the tables and vies are related (preferable using key value). consider this
case as a Parent/Child relationship between the table and view respectively.

You can thus bring all the data related to the three tables into a single
dataset at the begining of the request using a single data adapter. Then you
can associate these data tables (tables and views) using a DataRelation
object and then use the DataRow.GetParentRow method of the parent table to
get the required values from the child tables.

Hope this helps ....

regards,

Kishor.
"keys4worship" wrote:
Here goes...
I am very new to programming. I am currenting using Visual Studio C# to
connect to SQL db. The db has only one table and two views. I have
created 3 datagrids on one page along with 3 sqladapters and datasets.
Each adapter uses a stored procedure used with the table and two views.
I have used the views to present summary totals of regions and areas
respectively. The first datagrid displays regional summary data. This
data consists of rows showing the area offices within the region and
total items pending in each area. Clicking on the area name in a row
will trigger the second datagrid which displays information for the
area along with summary data for the offices within the area. Clicking
on the office name in this grid triggers the third datagrid with
detailed information of items within that office. I am sure doing a lot
of setting of the visible properties of these datagrids. Is there a
better/proven way to deal with something like this?

Thanks

Nov 19 '05 #2

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

Similar topics

1
by: Simon Harris | last post by:
Hi All, I wish to populate more than one datagrid from the same OleDBCommand. The code I have is: Dim objCmd As New OleDbCommand(strSql, objConn) Then... ...
4
by: ree32 | last post by:
I have a placeholder and depending on a user input(a drop downlist) when the user clicks a button I dynamically create a number of datagrids and fill them with data from a database. But the problem...
0
by: Scott Meddows | last post by:
I'm having trouble scrolling some datagrids so they sync up... I have two identical datagrids on a form, filled with eh same dataset. I want a user to be able to scroll on the datasets and the...
0
by: CodeMouse [MSFT] | last post by:
For those struggling with getting datagrids to behave and/or work with SQL, I have a post on my new blog that may help with that ... http://weblogs.asp.net/codemouse/ If you notice any other...
4
by: | last post by:
Hello. In SQL Server Query Analyzer, if I type in, say, 2 select queries, it returns 2 datagrids of results, with a scrollbar on the right to scroll between the 2 (or more) datagrids. I wanted to...
3
by: Mark Wiewel | last post by:
hi all, i am a newbie in ASP.NET and i couldn't find the solution to this one: i have a form with three datagrids on it. i would like to align them vertically with a space between each grid of...
7
by: Ausclad | last post by:
Ok, ill try again..... It seems fairly simple. I have two combo boxes in a datagrid. The datagrid is bound to a a table in a dataset. The two combo boxes are bound to a single data table...
2
by: rn5a | last post by:
In a shopping cart app, a ASPX page retrieves the order details & personal details of a user from a MS-Access database table depending upon the username of the user. The order details of a...
0
by: Jim | last post by:
OK here's my disclaimer: I'm very new to ASP.NET and posting on Google Groups, so please bear with me and feel free to correct either the way I code or the way I post. I have an ASP.NET page...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.