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
40
how to solve this error
posted

As i was trying to do something , but didn't modify any code

but i'm getting following error

does not contain a definition for 'ultraGridReport_InitializeLayout'

 

how to fix it

Thanks

Parents
No Data
Reply
  • 710
    posted

    The designer code (in the FormName.Designer.cs file) has a delegate to a handler procedure in your form page (FormName.cs)  But that procedure is not there.

    The easierst fix is to

    1. open the form in the form designer (double click on the form in the solution explorer). 

    2. Highlight the grid control (UltraGridReport).

    3. In the properties window, press the events button (at the top, looks like a lightning bolt)

    4. look for the setting called "Initialize Layout".  This will be set to the value "UltraGridReport_InitializeLaout". 

    5.  Use backspace or delete to clear this setting.

    Tthe problem should be fixed.   You can double-click on the "Initalize layout:" setting if you need to add a handler for this event.

     

    However, its possible that you won't be able to open the form in the designer.  (Some errors prevent it from opening, I don't know if this one will). 

    In that case, you must open the designer code by right clicking on the designer code file (FormName.Designer.cs). and choosing "view code".

    Then look through the code for a line that creates the delegate for "ultraGridReport_IntializeLayout";  I don't know exactly what the line will look like, but it will probalby use the += operator to add an object to an event and that object will probalby take the procedure  ultraGridReport_InitializeLayout as a parameter.   This is probably the only line that mentions ultraGridReport_InitializeLayout.

    You need to delete that line.   That will also fix the error. 

Children
No Data