Question : VB.NET - Windows form checkbox

Hello experts,

I create a small windows application that allow users to update some information.  When the user type in an ID if it exists it'll pull that information to the windows form and allow user to make changes.  There are 2 checkboxes for Fabricated or Purchased ("Yes", "No") that gets checked base on what's being pulled from database.

If drExists.Item("FABRICATED").ToString = "Y" Then
      chkFab.checked = True
Else
      chkFab.Checked = False
End If
If drExists.Item("PURCHASED").ToString = "Y" Then
      chkPurc.checked = True
Else
      chkPurc.Checked = False
End If

This works fine, but when the user go and check the other. When I do the update it doesn't reflect the change.  Example, user change an item that is set as "Purchased" by mistake.   They pull it for an update and then chkPurc.Checked is checked since that's what's in the database.  They change it to "Fabricated" by checking chkFab.Checked.  When I do the update it looks at chkPurc.Checked as True even though it's not any more from the interface.  How could I change it so that it looks at what was change at the interface level?

Answer : VB.NET - Windows form checkbox

Hi,

Since the page directive is not included in the code you have posted i cant see whether you have tried this but there is a property called "MaintainScrollPositionOnPostback" that you can set to true in the page directive which will force the page to maitain the scroll position on postback.

/Carl.
Random Solutions  
 
programming4us programming4us