[CLOSED] Direct Method Not firing.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Direct Method Not firing.

    Hello again,
    I have a commandColumn that generates message box with yes/no confirmation then fires directmethod in code behind if yes.
    Code below was working in 1.7, now in v4 seems to have broken.
    Given this a good couple of hours with no luck, the most I can get is the message box to fire but nothing on the yes button click.
    Getting this error in the browser console if it helps. "Uncaught TypeError: Ext.Msg.Alert is not a function"

    <script type="text/javascript">
            var deleteOrder = function (grid, command, record, row) {
    
    
                Ext.Msg.show({
                    title: 'Delete Order? This cannot be undone!',
                    msg: 'Deleting an order will delete all associated tickets, are you sure?',
                    buttons: Ext.Msg.YESNO,
                    icon: Ext.Msg.QUESTION,
                    fn: function (btn) {
    
                        
                        if (btn == 'yes') {
                           
                            Ext.net.DirectMethods.DeleteOrder(id);
                            
                            
                        }
    
                    }
                });
    
    
    
            }
    </script>
     <ext:GridPanel ID="GridPanelOrderTickets" runat="server" StripeRows="true" Title="Orders"
                TrackMouseOver="true" Height="320" StoreID="SearchOrderStore" AutoScroll="true" Frame="true" Width="1400">
                <ColumnModel ID="ColumnModel2" runat="server">
                    <Columns>
     <ext:CommandColumn runat="server" Width="80" Header="Delete">
                            <Commands>
                                <ext:GridCommand Icon="Delete">
                                    <ToolTip Text="Delete Order" />
                                </ext:GridCommand>
                            </Commands>
                            <Listeners>
                                <Command Fn="deleteOrder" />
                            </Listeners>
                         
                        </ext:CommandColumn>
     </Columns>
                </ColumnModel>
    
     <DirectMethod()>
        Public Sub DeleteOrder(ByVal OrderID As Integer)
            Try
                'Do stuff in here with OrderID
    
            Catch ex As Exception
                ShowInfoBox("Error", ex.Message, MessageBox.Icon.ERROR, False, "")
            End Try
        End Sub
    Last edited by fabricio.murta; Mar 15, 2019 at 7:12 PM. Reason: no feedback from the user in 7+ days

Similar Threads

  1. Replies: 2
    Last Post: May 13, 2014, 8:52 AM
  2. [CLOSED] Delay firing of Direct Method ...
    By rthiney in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 10, 2014, 4:28 PM
  3. Direct Method is not firing
    By amida in forum 2.x Help
    Replies: 1
    Last Post: Mar 25, 2013, 7:24 AM
  4. [CLOSED] Output Cache issue with Direct Method / Direct Event
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 18
    Last Post: Mar 01, 2013, 5:03 AM
  5. UserControl Direct Method is not Firing...
    By nagesh in forum 2.x Help
    Replies: 3
    Last Post: Nov 29, 2012, 1:06 PM

Posting Permissions