473,603 Members | 2,635 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datagrid and multiple tables

I am building an online testing application that uses a usercontrol to
navigate through a list of questions. The questions are multiple choice.
I have a stored procedure that returns two tables: questions & answers.
I have defined a relationship in code using a DataRelation. I would like
to use a datagrid to display the questions and answers in order to take
advantage of paging offered with the datagrid. Where I am having
difficulty is determining how to have the datagrid list the question
from one table and then the answers from the child table. Any
suggestions?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
0 1138

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

Similar topics

1
2588
by: Soul | last post by:
*** I am not sure this question belong to *.languages.csharp or *.framework.windowsdorms.databinding, so I post to both *** Hi, Currently I have a DataGrid which bind to a DataSet. One of the column in the DataSet table consist of DateTime value. I also have two DateTimePicker (startDate and endDate) on my Windows form.
1
18241
by: Brian | last post by:
I have a dataset containing 2 tables. I need to fill a datagrid using data from both of these. If I could create a SQL Statement to fill the datagrid, it would look like this: SELECT fields.fieldname, fieldvalues.value FROM fields, fieldvalues I am having trouble finding documentation explaining how to populate
1
5286
by: Craig Banks | last post by:
If a row of data in a dataset has a lot of columns the row displaying the data in a datagrid will run way off the screen. What I'd like to do is display a row of data over several datagrid rows so the user doesn't have to scroll horizontally. Essentially, I want to wrap a datagrid row (not text in individual columns) with as much control as possible. Make sense? While this seems simple enough on the surface, I can't figure out how to do...
3
2986
by: Maverick | last post by:
Assume i have 2 tables stored in a single dataSet (ds) and the relationship is well added ds.Tables("product") ds.Tables("descriptors") what I want to do is show the data from 2 of the tables, linked by the relationship, on the SAME DataGrid juz like the data is select by "Join" but i cannot find the correct code to do this. I am looking for something like:
2
6388
by: CSL | last post by:
I am using the DataGrid in a Windows Application, how can I adjust the widths of each column individually.
6
9223
by: Rob | last post by:
I am trying to copy some data from one datagrid to another. The first datagrid containing data is called DocList. The blank Datagrid that I am trying to copy some data to is called DataGrid1. Please tell me the simplist way to loop through an existing datagrid, access it's columns and rows, then copy parts of that data to a blank Datagrid1. Thank you. What I've tried unsuccessfully:
6
3494
by: Bill nguyen | last post by:
I use DatagridTableStyle to display data from table WF_Carrier_FreightChart. USers than can add/delete/edit rows in the Datagrid. Since the Datagrid's datasource "dCarrierFreight" is just a copy/view of the table (dataset dFreight.tables(0) ), I need to update the original table to reflect multiple changes in the Datagrid. Your help is greatly appreciated. Bill
1
1399
by: Waran | last post by:
How to bind Multiple results into a datagrid. For example Assume the values for dsCustCode.Tables(0).Rows.Count = 4,and the values are "'Val1','val2','val3','val4'" in the below loop In the above situation four datasource needs to be bind in the grid. I know the below is binding the last value's (Val4) datasource in the DataGrid For iCountCustCode = 0 To dsCustCode.Tables(0).Rows.Count - 1 CusCode =
3
1700
by: Aaron | last post by:
Hi, It is possible to establish relationships between tables within a dataset and this allows some useful features. For example, given a row from a table you can use GetParentRow, GetParentRows, GetChildRows. However, I don't see a good way to represent data from multiple dataset tables within a single datagrid (although I can think of at least one bad way). For example, if you have a Invoice table which instead of having an company...
0
1221
by: bh | last post by:
Using the pubs database, for testing, and example, I'm trying to bind a datagrid that draws data from multiple tables to use for updating multiple rows at once. For my example, I want to display Titles, Authors & Prices, and update the prices. The code I'm using is below, but I get an exception, on binding the grid stating "A field or property with the name 'Pub_name' was not found on the selected datasource". In the command window, in...
0
7928
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8415
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8273
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6735
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5878
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3951
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2430
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
1514
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.