Re: Trap a build start event from designer
- From: bmelt <bmelt12345@xxxxxxxxxxxxxxxx>
- Date: Wed, 26 Sep 2007 15:52:02 -0700
Hi Jack,
Thanks for your suggestion. Grid used is not the DataGridView, but I believe
the problem should be similar.
There are 3 possible events when changes in the last modified cell could be
commited:
--on typing each character,
--on end editing (like pressing enter or leaving the cell),
--on start compilation
To avoid lost of the latest change in case user miss the 2nd type of event,
we can use 1st or 3rd ones.
I would prefer the 3rd one - it looks more efficient. If it is impossible,
I'll work on the 1st one, similar to your suggestion - as I actually
mentioned in my previous update. I hope there is a way to trap build start
event from Designer using MenuCommandService class or something similar, it
just not clearly documented.
Regards,
Boris
"Jack Jackson" wrote:
If you are using a DataGridView, you can force changes to be committed.
immediately instead of when leaving the field. Maybe that would help.
Protected Overrides Sub onCurrentCellDirtyStateChanged(ByVal e As
System.EventArgs)
MyBase.OnCurrentCellDirtyStateChanged(e)
If IsCurrentCellDirty Then
CommitEdit(DataGridViewDataErrorContexts.Commit)
End If
End Sub
On Wed, 26 Sep 2007 14:12:02 -0700, bmelt
<bmelt12345@xxxxxxxxxxxxxxxx> wrote:
Hi Linda,
In my app, custom control is a grid. If I set value in grid cell using
properties, yes, IDE saves changes before compilation. It looks more
convenient for users to type values in grid cells directly, and update
properties when cell value is stored (serializer is called in my code). The
problem is that cell's new value is not stored with each character typed, but
only when moving to another cell. If user types new value and forget to move
to another cell before pressing F5, new value is not stored before
compilation. From this point, it would be convenient to trap build start
event and store the last cell value before compilation. If you'll not be able
to help me trap this event, I'll try to find a workaround in control itself
changing value store code.
I see that using MenuCommandService class we can handle some menu commands
in Designer. Is it possible to solve my problem with this or with something
similar? Commands that I need are not in StandardCommands so it seems I just
need a GUID and command ID for "Build" menu item to use MenuCommandService ?
If this should work, where can I find GUID and command ID for menu items I'm
interested in?
Regards,
Boris
"Linda Liu [MSFT]" wrote:
Hi Boris,
Thank you for your prompt reply!
Generally speaking, if we make some changes in design time and then build
the project directly, VS IDE saves the changes first which serializes the
changes to code and then begin the compilation.
Could you provide more information about your custom control and custom
serializer? If it is difficult to describe, you may send me a simple
project that could just reproduce the problem.
To get my actual email address, remove 'online' from my displayed email
address.
Sincerely,
Linda Liu
Microsoft Online Community Support
- Follow-Ups:
- Re: Trap a build start event from designer
- From: Linda Liu [MSFT]
- Re: Trap a build start event from designer
- References:
- RE: Trap a build start event from designer
- From: Linda Liu [MSFT]
- RE: Trap a build start event from designer
- From: bmelt
- RE: Trap a build start event from designer
- From: Linda Liu [MSFT]
- RE: Trap a build start event from designer
- From: bmelt
- Re: Trap a build start event from designer
- From: Jack Jackson
- RE: Trap a build start event from designer
- Prev by Date: Re: Trap a build start event from designer
- Next by Date: Re: Trap a build start event from designer
- Previous by thread: Re: Trap a build start event from designer
- Next by thread: Re: Trap a build start event from designer
- Index(es):
Relevant Pages
|
Loading