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
95
Ultra Grid (with embedded UltraDateTimeEditor) does not firing AfterDropDown event of embedded UltraDateTimeEditor
posted

Hello All,

I am having one wrapper class on UltraDateTimeEditor say CustomUltraDateTimeEditor 

e.g. -

public partial class CustomUltraDateTimeEditor : UltraDateTimeEditor
{
#region Datamebers

private DateTime? oldDateValue;
private string messageTitle = string.Empty;
private string timeZone;

#endregion

#region Constructor

///


/// Initializes a new instance of the class.
///
public CustomUltraDateTimeEditor ()
{
this.InitializeComponent();
this.BeforeEnterEditMode += this.CustomUltraDateTimeEditorBeforeEnterEditMode;
this.BeforeExitEditMode += this.CustomUltraDateTimeEditorBeforeExitEditMode;
this.AfterDropDown += this.CustomUltraDateTimeEditorAfterDropDown;
this.Enter += this.CustomUltraDateTimeEditorEnter;
}

....


This control I have embedded into one of Ultragrid's column. 

e.g.

 col.EditorComponent = new CustomUltraDateTimeEditor{};

Now Whenever I click on cell containing CustomUltraDateTimeEditor control, I need to call AfterDropDown event of that. but in current situation its not happening.

As I need a CustomUltraDateTimeEditor controls IsHandleCreated property as true, for overriding current system time of control. (For supporting multitimezone)

Any response will be highly appercitaed. :) Thanks in advance..!

Parents
  • 6120
    Offline posted

    Hi Ganesh, 

    When you set a control as the editor of a column, we don’t use the control directly. We use just the internal editor of the control, as such the events on the control will not be fired. To get the event behavior that you want you will need to hook up the events on the column’s Editor, as in below: 

        col.EditorComponent = new CustomUltraDateTimeEditor{};

        col.Editor.AfterDropDown += Editor_AfterDropDown; 

    Please let me know if you have any additional questions. 

    Sincerely,
    Sahaja Kokkalagadda
    Associate Software Developer
    Infragistics, Inc.

Reply Children