Controls not readonly when bound to a businessbindingsource


Author
Message
Jerome Barnett
Jerome Barnett
StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)
Group: Forum Members
Posts: 10, Visits: 65
Rav-



What I would do is go back to how you origianlly had you bindings set up. (Grid to BBS and Textboxes to BO)



Then just handle the rowchanged or Cell Click event of the grid to tell your BO to navigate to another row.



Use the EditingStateChanged and FieldPropertyChanged Eventos of the BO on your form to manage the enabled/disabled state of your buttons



Sub EditingStateChanged

btnOK.Enabled = myBO.IsDirty

btnCancel.Enabled = myBO.IsDirty

End Sub




-Jerome
Rav
Rav
StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)
Group: Forum Members
Posts: 10, Visits: 20
Jerome Barnett (04/23/2007)
Rav-

What I would do is go back to how you origianlly had you bindings set up. (Grid to BBS and Textboxes to BO)

Then just handle the rowchanged or Cell Click event of the grid to tell your BO to navigate to another row.

Use the EditingStateChanged and FieldPropertyChanged Eventos of the BO on your form to manage the enabled/disabled state of your buttons

Sub EditingStateChanged
btnOK.Enabled = myBO.IsDirty
btnCancel.Enabled = myBO.IsDirty
End Sub


-Jerome

I think the problem I ran into when doing it that way was that the grid and the texboxes were not synchronized.  The current record on the grid was not the record displayed on the textboxes.  I'll give it another shot.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search