Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1510
UltraDateTimeEditor problems
posted

Hi there!

I know I'm in the Grid forum, but couldn't find a specific forum for this control ...

I have one simple quesion:

Why does the ValueChanged event fire when I'm drilling back and forth in this control ?

My scenario is that I want to open a 2nd form the moment the user has picked a NEW date from the UltraDateTimeEditor, but this event also fires when the user is changing the calendar ( using the right and left buttons on the control ) ??? Why does that happen ...

I don't want to open the 2nd control when the user is drilling back and forward inside the control ?
How can I detect that the user has actually picked some date ? I don't want the event to fire when the user is for e.g. scrolling between months ??

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if

 

 

(_ugTab3ProjectSettings.Selected.Rows[0] != null

)

{

Infragistics.Win.UltraWinGrid.

 

UltraGridRow

selectedRow = _ugTab3ProjectSettings.Selected.Rows[0];

 

 

if ((DateTime)selectedRow.Cells["FinishDate"].Value != (DateTime

)_utTab3FinishDateCurrent.Value)

{

 

 

if (_needToLoadFinishChangesForm == false

)

{

_needToLoadFinishChangesForm =

 

true

;

 

 

return

;

}

 

 

else

{

 

 

if (_ugTab3ProjectSettings.Selected.Rows[0] != null

)

{

 

 

FinishDateChanges changes = new FinishDateChanges

();

changes._projectIdBeingWorkedWith = (

 

int)selectedRow.Cells["ProjectID"

].Value;

changes._projectNameBeingWorkedWith = (

 

string)selectedRow.Cells["ProjectName"

].Value;

changes._changeDateSelectedInHistoryControl = (

 

DateTime

)_utTab3FinishDateCurrent.Value;

changes.ValueUpdated +=

 

new Kaupthing.ResPlanner.Gui.Forms.FinishDateChanges.ValueUpdatedEventHandler

(ChildForm_ValueUpdated);

_utTab3FinishDateCurrent.CloseUp();

_needToLoadFinishChangesForm =

 

false

;

changes.ShowDialog(

 

this

);

rgd,
EE.

  • 1510
    posted

    I moved the code to

    _utTab3FinishDateCurrent_AfterCloseUp

    I think that's the only solution

    then I check if the selected value is that same as the "BeforeEnterEditMode" value was .... this works.

    rgd,
    EE.