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
3788
Problem to load javascript file
posted

I have a UserControl1.ascx in this userControl, i have hosted another usercontrol

GridUserControl.ascx.

In GridUserControl has a grid with ClientEvent <ColumnMovingClientEvents HeaderDropped="WebDataGridView_HeaderDropped" />

i am loading UserControl1.ascx dynamically.

and adding it in a panel which is inside the UpdatePanel.

on adding it, i am getting the error  

WebDataGridView_HeaderDropped should be a function,function name, or function text.

why is this error come while WebDataGridView_HeaderDropped function is already written

in the GridUserControl.ascx file?

Parents
No Data
Reply
  • 640
    posted

    Hi Mypost,

    As the error suggests the ColumnMovingClientEvents.HeaderDropped expects its value to be a globally defined JavaScript function name, JavaScript function or a script text(one that can be evaluated using eval()). Are you sure that the function WebDataGridView_HeaderDropped is defined before the place where the WebDataGrid is rendered?

    It would be helpful if you could provide some source code or a complete example.

    Regards,

    Angel Yordanov

Children
No Data