Link to home
Start Free TrialLog in
Avatar of prinsbj
prinsbjFlag for Netherlands

asked on

My DataRowState.Modified always when I fill data in winform and my Combobox is filled.

I've a Combobox that loads date on fill. The may code is activated to do something. After that my DataRowState is always modified. Even if i didn't change the selectedrow of a combobox.

What kind of property do i need to use to get the DataRowState Modified and not when i fill the date on starting.

Hope you can help.
Private Sub ucboFromCompanyName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ucboFromCompanyName.ValueChanged
        MaterialInwardBindingSource.Current("FromCompanyName") = ucboFromCompanyName.SelectedRow.Cells("CompanyName").Value
        MaterialInwardBindingSource.Current("FromAddress1") = ucboFromCompanyName.SelectedRow.Cells("Address1").Value
        MaterialInwardBindingSource.Current("FromAddress2") = ucboFromCompanyName.SelectedRow.Cells("Address2").Value
        MaterialInwardBindingSource.Current("FromAddress3") = ucboFromCompanyName.SelectedRow.Cells("Address3").Value
        MaterialInwardBindingSource.Current("FromPostalCode") = ucboFromCompanyName.SelectedRow.Cells("PostalCode").Value
        MaterialInwardBindingSource.Current("FromCity") = ucboFromCompanyName.SelectedRow.Cells("City").Value
        MaterialInwardBindingSource.Current("FromRegion") = ucboFromCompanyName.SelectedRow.Cells("Region").Value
        MaterialInwardBindingSource.Current("FromCountryName") = ucboFromCompanyName.SelectedRow.Cells("CountryName").Value
    End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of prinsbj

ASKER

How can I do that?
Avatar of prinsbj

ASKER

I've found it. Thank you!