473,396 Members | 1,785 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.

Filter MasterDetail datagrids?

dfjhsqd asked this earlier in the week and I have the same question.
How can I apply a filter to the Master table when using two datagrids
in a MasterDetail relationship?
Nov 21 '05 #1
1 1257
set the datagrids datasource to the dataview of the dataset. If you do this
you can set the dataview filter property.

Ex.
Me.DataSetWellMobile1.Relations.Add( _
New DataRelation( _
relationName:="relWellInfo", _
parentColumn:=Me.DataSetWellMobile1.Tables("TblPeo ple").Columns("UniqueId"),
_
childColumn:=Me.DataSetWellMobile1.Tables("TblWell MobileInfo").Columns("Pers
onId"), _
createConstraints:=True))

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

Or

Me.DGWellResults.Datasource=Me.DataSetWellMobile1. TblPeople.DefaultView
Me.DataSetWellMobile1.TblPeople.DefaultView.RowFil ter="Name"

Brad

"Engineerik" <En********@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
dfjhsqd asked this earlier in the week and I have the same question.
How can I apply a filter to the Master table when using two datagrids
in a MasterDetail relationship?

Nov 21 '05 #2

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

Similar topics

1
by: Mike C | last post by:
I have a datagrid that outputs sales data like this: Customer Month Sales Acme Corp Jan 1,345 Acme Corp Feb 2,567 I'm trying to make it look like this: Customer ...
0
by: Dave | last post by:
Hi Have Master/Detail relationship within 2 datagrids. Binding works fine, when a user selects a row in the Master grid it updates the display in the detail grid, awesome...........but.. I...
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...
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...
2
by: Mike C | last post by:
I have an account list. There's an asterix in the account name if it has closed. For example, Acm* Corp. I don't agree with this design but that's what our company came up with. Anyway, I'm trying...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.