M
Mika M
Hello!
My application has MainMenu containing MenuItem 'mnuSave' and ToolBar
containing ToolBarButton 'tbbSave'.
When users has edited DataGrid or any of the TextBoxes on the windows form,
then ds.HasChanges (ds=DataSet) will be 'True', then I want set ...
mnuSave.Enabled = ds.HasChanges
tbbSave.Enabled = ds.HasChanges
.... automatically because these (mnuSave and tbbSave) are not enabled when
ds.HasChanges = False.
.... and finally when mnuSave or tbbSave is pressed and changes saved into
database tables then ds.HasChanges will be 'False', mnuSave and tbbSave
should be not Enabled again.
How to notice when ds.HasChanges state will change and do this
automatically? I think it should be captured somehow using EventHandler
(AddHendler) or something, but don't know how yet.
My application has MainMenu containing MenuItem 'mnuSave' and ToolBar
containing ToolBarButton 'tbbSave'.
When users has edited DataGrid or any of the TextBoxes on the windows form,
then ds.HasChanges (ds=DataSet) will be 'True', then I want set ...
mnuSave.Enabled = ds.HasChanges
tbbSave.Enabled = ds.HasChanges
.... automatically because these (mnuSave and tbbSave) are not enabled when
ds.HasChanges = False.
.... and finally when mnuSave or tbbSave is pressed and changes saved into
database tables then ds.HasChanges will be 'False', mnuSave and tbbSave
should be not Enabled again.
How to notice when ds.HasChanges state will change and do this
automatically? I think it should be captured somehow using EventHandler
(AddHendler) or something, but don't know how yet.