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

master detail in textbox control

Is it feasible to do master detail in textbox control? If I do it with datagridview control, I have no problem. However, when I tried to use textbox control, I had running error. I have googled it for a month and don't see anybody dealing with this questions so hope somebody can give me a definite answer. Maybe it's not possible to use textbox control at all. Ben
Sep 15 '09 #1
3 1776
tlhintoq
3,525 Expert 2GB
s it feasible to do master detail in textbox control?
What do you mean by "master detail"?
I had running error.
Could you please provide the relevant code and description of the error?
Sep 15 '09 #2
I'm using strong typed dataset.

The problem ties with datarelation string "BGHuntedBGHarvest." The "KillNo" is one data field in detail datatable. If I remove the binding, the error will show next data field. The error will be gone until I remove all data fields that not in the datarelation columns. Thanks. Ben

This is error message:
************************************************** **************************

BGHarvestBindingSource.DataMember = "BGHuntedBGHarvest"

Cannot bind to the property or column KillNo on the DataSource.
Parameter name: dataMember
************************************************** **************************
Here is the code:
Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.  
  3.     Private Sub BGHuntedBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BGHuntedBindingNavigatorSaveItem.Click
  4.         Me.Validate()
  5.         Me.BGHuntedBindingSource.EndEdit()
  6.         Me.BGHuntedTableAdapter.Update(Me.WL_TECHDataSet.BGHunted)
  7.  
  8.     End Sub
  9.  
  10.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  11.         'TODO: This line of code loads data into the '_WL_TECHDataSet.BGHarvest' table. You can move, or remove it, as needed.
  12.         Me.BGHarvestTableAdapter.Fill(Me._WL_TECHDataSet.BGHarvest)
  13.         'TODO: This line of code loads data into the '_WL_TECHDataSet.BGHunted' table. You can move, or remove it, as needed.
  14.         Me.BGHuntedTableAdapter.Fill(Me._WL_TECHDataSet.BGHunted)
  15.         Dim MasterColumn() As DataColumn
  16.         Dim DetailColumn() As DataColumn
  17.         MasterColumn = New DataColumn() {_WL_TECHDataSet.BGHunted.Columns("HuntingSeason"), _
  18.             Me._WL_TECHDataSet.BGHunted.Columns("SeqNo"), _
  19.             Me._WL_TECHDataSet.BGHunted.Columns("ShortName"), _
  20.             Me._WL_TECHDataSet.BGHunted.Columns("CountyCode")}
  21.  
  22.         DetailColumn = New DataColumn() {Me._WL_TECHDataSet.BGHarvest.Columns("HuntingSeason"), _
  23.             Me._WL_TECHDataSet.BGHarvest.Columns("SeqNo"), _
  24.             Me._WL_TECHDataSet.BGHarvest.Columns("ShortName"), _
  25.             Me._WL_TECHDataSet.BGHarvest.Columns("CountyCode")}
  26.  
  27.  
  28.         'Me.Big_Game_Harvest_SurveyDataSet.Relations.Clear()
  29.         Dim relation As New DataRelation("BGHuntedBGHarvest", MasterColumn, DetailColumn, False)
  30.         Me._WL_TECHDataSet.Relations.Add(relation)
  31.         BGHuntedBindingSource.DataSource = Me._WL_TECHDataSet.BGHunted
  32.         BGHarvestBindingSource.DataSource = BGHuntedBindingSource
  33.         BGHarvestBindingSource.DataMember = "BGHuntedBGHarvest"
  34.  
  35.     End Sub
  36. End Class
{email address removed}
Sep 16 '09 #3
tlhintoq
3,525 Expert 2GB
TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.
Sep 16 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Marcel | last post by:
Hi, I'm new to VS and ASP.NET and have a question about master/detail datagrids. I have a master datagrid filled with data via a component that contains a SQL adapter. Now I would like to fill...
3
by: Rick | last post by:
Using VWD, I am attempting to create a basic Master/Detail scenario from a SQL database table that has two primary keys. The Master control I'm using is a GridView, containing a list of records...
2
by: Ken C | last post by:
I've setup a Master detail table from a typed dataset on 2 different data grid The first one I bind it with the Master data table name The second data set I bind it with the MasterDetail...
1
by: Bruno | last post by:
Hello friends I want to create one master-detail form with a textbox and a datagrid, where I can put the id of one client on the text box and see his orders on the datagrid. I can create this...
2
by: Dan | last post by:
I found an example of a A Master/Detail DataGrid Control in a MSDN magazine ( http://msdn.microsoft.com/msdnmag/issues/03/08/CuttingEdge/ ). The code is in c# so I converted it to vb.net and I am...
3
by: sqlboy2000 | last post by:
Hi, I've just started playing around with master / detail pages and I'm trying to simply change the detail page displayed in the contentplaceholder control from code behind. I can't seem to find...
0
by: Mike Wilson | last post by:
Dear group, I have an invoice entry form, which is a simple Master fields / Detail grid. The main summary information of the invoice are stored in one table in a dataset, which is bound using a...
2
by: John | last post by:
Hi I am trying to create a master/detail form. I have my master and details tables dragged onto the dataset. I have also dragged the fields from master table on the form which has created the...
1
by: jagguy | last post by:
I am using vb.net 1.1 Hi, I am trying to create a master/detail form with Access I am creating a master/detail setup with master records in a textbox and the details are in a datagrid. This...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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,...

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.