Click here to Skip to main content
15,887,585 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionApplication path in VB.Net Pin
Priya_20071-Mar-07 20:08
Priya_20071-Mar-07 20:08 
AnswerRe: Application path in VB.Net Pin
Colin Angus Mackay1-Mar-07 22:38
Colin Angus Mackay1-Mar-07 22:38 
AnswerRe: Application path in VB.Net Pin
Dave Kreskowiak2-Mar-07 4:17
mveDave Kreskowiak2-Mar-07 4:17 
QuestionHow to create a frames in vb.net? Pin
jeyanvidu1-Mar-07 18:53
jeyanvidu1-Mar-07 18:53 
AnswerRe: How to create a frames in vb.net? Pin
JUNEYT2-Mar-07 1:52
JUNEYT2-Mar-07 1:52 
QuestionHow do I fill a color fo range of selcted cell? Pin
B.L.Praveen1-Mar-07 18:31
B.L.Praveen1-Mar-07 18:31 
AnswerRe: How do I fill a color fo range of selcted cell? Pin
JUNEYT4-Mar-07 4:59
JUNEYT4-Mar-07 4:59 
Questiontyped datset, refilling problem Pin
steve_rm1-Mar-07 14:52
steve_rm1-Mar-07 14:52 
Hello,

[2005]

I have a datagrid that is bound to a typed dataset. I have a combo box that is bound to the same typed dataset.

The user will select from the combo a category the bindingsource will filter only the categories that the user wants displayed in the datagrid.

However, i have button called reset, which should display everything back into the dataset. However, it doesn't do this. I have checked to see how many record are contained in the dataset after the reset button is clicked during the debugger and the number of rows is correct.

The dataset are filled during the form load and when the user clicks the reset button

I know that everytime the dataset gets filled, it is cleared and filled automatically, so I don't understand why this would happen. My code is below. Thanks for any advice on this code.

'Load categories into equipment category combo box<br />
    Private Sub LoadCategories()<br />
        Try<br />
            Me.cboCategory.DataSource = Me.DsAddComponetAndEquipment1.SoftwareCategory<br />
            Me.cboCategory.DisplayMember = "Category"<br />
            Me.cboCategory.ValueMember = "CategoryID"<br />
        Catch ex As Exception<br />
            MessageBox.Show(ex.Message)<br />
        End Try<br />
    End Sub


'Load all the components into the grid<br />
    Private Sub LoadAllSoftware()<br />
        Try<br />
            Me.TA_Software_dsComponent_Equipment1.Fill(Me.DsAddComponetAndEquipment1.Software)<br />
            Me.dgvSoftware.DataSource = Me.DsAddComponetAndEquipment1.Software<br />
        Catch ex As Exception<br />
            MessageBox.Show(ex.Message)<br />
        End Try<br />
    End Sub


'Reload all software<br />
   Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click<br />
       Me.LoadAllSoftware()<br />
   End Sub


 'Display what the user has selected from the category of sofware<br />
    Private Sub cboCategory_SelectionChangeCommitted(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboCategory.SelectionChangeCommitted<br />
        Dim bsCategory As New BindingSource<br />
<br />
        Try<br />
            bsCategory.DataSource = Me.DsAddComponetAndEquipment1.Software<br />
            bsCategory.Filter = String.Format("CategoryID = {0}", Me.cboCategory.SelectedValue)<br />
<br />
            Me.dgvSoftware.DataSource = bsCategory<br />
<br />
        Catch ex As Exception<br />
            MessageBox.Show(ex.Message)<br />
        End Try<br />
    End Sub

Thanks very much for your time,

Steve
AnswerRe: typed datset, refilling problem Pin
Johan Hakkesteegt2-Mar-07 0:06
Johan Hakkesteegt2-Mar-07 0:06 
AnswerRe: typed datset, refilling problem Pin
steve_rm8-Mar-07 16:20
steve_rm8-Mar-07 16:20 
QuestionSave As Pin
Anybloodyid1-Mar-07 11:39
Anybloodyid1-Mar-07 11:39 
AnswerRe: Save As Pin
Dave Kreskowiak1-Mar-07 14:32
mveDave Kreskowiak1-Mar-07 14:32 
GeneralRe: Save As Pin
Anybloodyid1-Mar-07 21:22
Anybloodyid1-Mar-07 21:22 
GeneralRe: Save As Pin
Dave Kreskowiak2-Mar-07 4:34
mveDave Kreskowiak2-Mar-07 4:34 
GeneralRe: Save As Pin
Anybloodyid2-Mar-07 10:35
Anybloodyid2-Mar-07 10:35 
GeneralRe: Save As Pin
Dave Kreskowiak2-Mar-07 14:37
mveDave Kreskowiak2-Mar-07 14:37 
GeneralRe: Save As Pin
Anybloodyid2-Mar-07 21:44
Anybloodyid2-Mar-07 21:44 
GeneralRe: Save As Pin
Dave Kreskowiak3-Mar-07 5:58
mveDave Kreskowiak3-Mar-07 5:58 
GeneralRe: Save As Pin
Anybloodyid3-Mar-07 9:30
Anybloodyid3-Mar-07 9:30 
Questioninheriting text file Pin
manni_n1-Mar-07 10:29
manni_n1-Mar-07 10:29 
AnswerRe: inheriting text file Pin
Colin Angus Mackay1-Mar-07 11:28
Colin Angus Mackay1-Mar-07 11:28 
AnswerRe: inheriting text file Pin
Christian Graus1-Mar-07 12:51
protectorChristian Graus1-Mar-07 12:51 
GeneralRe: inheriting text file Pin
Colin Angus Mackay1-Mar-07 13:04
Colin Angus Mackay1-Mar-07 13:04 
GeneralRe: inheriting text file Pin
Christian Graus1-Mar-07 13:23
protectorChristian Graus1-Mar-07 13:23 
GeneralRe: inheriting text file Pin
manni_n1-Mar-07 20:04
manni_n1-Mar-07 20:04 

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.