Click here to Skip to main content
15,919,898 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Cash Drawer Opening Pin
Christian Graus7-Sep-07 6:25
protectorChristian Graus7-Sep-07 6:25 
GeneralRe: Cash Drawer Opening Pin
Dave Kreskowiak7-Sep-07 6:53
mveDave Kreskowiak7-Sep-07 6:53 
GeneralRe: Cash Drawer Opening Pin
Christian Graus7-Sep-07 6:57
protectorChristian Graus7-Sep-07 6:57 
GeneralRe: Cash Drawer Opening Pin
imlambo8-Sep-07 4:16
imlambo8-Sep-07 4:16 
GeneralRe: Cash Drawer Opening Pin
Dave Kreskowiak8-Sep-07 6:03
mveDave Kreskowiak8-Sep-07 6:03 
GeneralRe: Cash Drawer Opening Pin
imlambo9-Sep-07 23:19
imlambo9-Sep-07 23:19 
AnswerRe: Cash Drawer Opening [modified] Pin
Manuel F. Hernandez7-Sep-07 6:36
Manuel F. Hernandez7-Sep-07 6:36 
QuestionNested Datagrid Error Checking - Help Pin
Smokeywade7-Sep-07 3:41
Smokeywade7-Sep-07 3:41 
I have One Datagrid with a dataset that calls two tables - the First table is the table the user will be editing - which edited on the grid or in a textbox - as the user edits the grid - that info is automatically updated onto the database - My problem is - when user goes to the nested table the application is still looking for parameters to update the database - which is causing errors - how will I prevent this from happening on the second table here his my code snippent - I know it has to have something to do with MyDataset.Tables(1) but I can not get the syntax down for this at all.


 'frmload<br />
  Dim command1 As New SqlCommand("Select * FROM LateOrders_Header_view", cnn1)<br />
        Dim command2 As New SqlCommand("Select * from LateOrders_Line_view", cnn1)<br />
        'Dim SqlReader As SqlDataReader<br />
        Try<br />
            cnn1.Open()<br />
<br />
            'Debug.WriteLine(cnn1.ConnectionString)<br />
            Dim dt As New DataTable("LateOrders_Header_view")<br />
            dgOrderReport.DataSource = dt<br />
            Dim DirAdapter As New SqlDataAdapter(command1)<br />
            Dim DirAdapter2 As New SqlDataAdapter(command2)<br />
            Dim dc1 As DataColumn<br />
            Dim dc3 As DataColumn<br />
            Dim datarelation As DataRelation<br />
<br />
            MyDataSet = New DataSet<br />
            MyDataSet = New DataSet<br />
            DirAdapter.TableMappings.Add("table1", "LateOrders_Header_view")<br />
            DirAdapter.TableMappings.Add("table2", "LateOrders_line_view")<br />
<br />
            DirAdapter.Fill(MyDataSet, "LateOrders_Header_view")<br />
            DirAdapter2.Fill(MyDataSet2, "LateOrders_Line_view")<br />
<br />
            dc1 = MyDataSet.Tables("LateOrders_Header_view").Columns("order_no")<br />
            dc3 = MyDataSet.Tables("LateOrders_Line_view").Columns("order_no")<br />
            datarelation = New DataRelation("Line View", dc1, dc3)<br />
            MyDataSet.Relations.Add(datarelation)<br />
            'dc3.ReadOnly = True<br />
<br />
            dgOrderReport.DataSource = MyDataSet.DefaultViewManager '.CreateDataView.Tables("LateOrders_Header_view").DefaultView<br />
            dgOrderReport.DataMember = "LateOrders_header_view"



'This controls the grid click event - This is where I believe I need to add something to let it know that this dosent apply to the second table
How do I let it know not to do this (below) for second table.

 <br />
    Private Sub dgOrderReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgOrderReport.Click<br />
        Try<br />
<br />
            txtReason.Text = dgOrderReport.Item(dgOrderReport.CurrentRowIndex, 4) & ""<br />
            txtReason.Enabled = False<br />
            chkReason.Checked = False<br />
<br />
        Catch ex As Exception<br />
            MessageBox.Show(ex.Message)<br />
        End Try<br />
       <br />
    End Sub<br />


Any Ideas....

Thank You

AnswerRe: Nested Datagrid Error Checking - Help Pin
Dave Kreskowiak7-Sep-07 9:44
mveDave Kreskowiak7-Sep-07 9:44 
Questionmy Custom control cannot be created dynamically Pin
BooleanTrue7-Sep-07 3:04
professionalBooleanTrue7-Sep-07 3:04 
AnswerRe: my Custom control cannot be created dynamically Pin
Duncan Edwards Jones7-Sep-07 3:32
professionalDuncan Edwards Jones7-Sep-07 3:32 
GeneralRe: my Custom control cannot be created dynamically Pin
BooleanTrue7-Sep-07 3:36
professionalBooleanTrue7-Sep-07 3:36 
QuestionCombobox problem Pin
Xerox47-Sep-07 1:05
professionalXerox47-Sep-07 1:05 
AnswerRe: Combobox problem Pin
plural7-Sep-07 1:25
plural7-Sep-07 1:25 
GeneralRe: Combobox problem Pin
Xerox47-Sep-07 1:38
professionalXerox47-Sep-07 1:38 
GeneralRe: Combobox problem Pin
Tom Deketelaere7-Sep-07 2:22
professionalTom Deketelaere7-Sep-07 2:22 
GeneralRe: Combobox problem Pin
Xerox47-Sep-07 2:34
professionalXerox47-Sep-07 2:34 
GeneralRe: Combobox problem Pin
Tom Deketelaere7-Sep-07 4:56
professionalTom Deketelaere7-Sep-07 4:56 
GeneralRe: Combobox problem Pin
plural7-Sep-07 2:25
plural7-Sep-07 2:25 
AnswerRe: Combobox problem Pin
Dave Kreskowiak7-Sep-07 5:49
mveDave Kreskowiak7-Sep-07 5:49 
GeneralRe: Combobox problem Pin
Xerox49-Sep-07 19:47
professionalXerox49-Sep-07 19:47 
QuestionCan any one help me for image displaying Pin
Senthil S7-Sep-07 1:01
Senthil S7-Sep-07 1:01 
AnswerRe: Can any one help me for image displaying Pin
SHatchard7-Sep-07 2:23
SHatchard7-Sep-07 2:23 
GeneralRe: Can any one help me for image displaying Pin
Tom Deketelaere7-Sep-07 2:28
professionalTom Deketelaere7-Sep-07 2:28 
Questionpop3 client Pin
nicetohaveyou7-Sep-07 0:45
nicetohaveyou7-Sep-07 0:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.