Order Manager does not reload data after batch operation.

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
mouse_8b
Commander (CMDR)
Commander (CMDR)
Posts: 115
Joined: Mon Oct 11, 2010 1:21 pm
Location: Austin, TX
Contact:

Order Manager does not reload data after batch operation.

Post by mouse_8b » Tue Feb 18, 2014 1:53 pm

Hello,
I have been implementing some minor changes to our Order Manager. I copied the "Update Selected Orders To" drop down box to the top, so there is one at the top of the list and one at the bottom. I changed the copied IDs as needed and updated the code-behind accordingly. However, whenever I use the new top box to change order statuses, the order grid does not get automatically reloaded like when I use the bottom box. The orders do get updated correctly, but I have to manually reload the page.
Any ideas on what is going on here? The changed code parts are below.

Here are the click handlers for the "GO" buttons

Code: Select all

    protected void BatchButtonTop_Click(object sender, EventArgs e){
        batch(BatchActionTop.SelectedValue);
        BatchActionTop.SelectedIndex = -1;
        OrderGrid.DataBind();
    }

    protected void BatchButton_Click(object sender, EventArgs e){
        batch(BatchAction.SelectedValue);
        BatchAction.SelectedIndex = -1;
        OrderGrid.DataBind();
    }

    private void batch(String action){
        //the rest of what is in the default BatchButton_Click
Here is the new top batch action drop-down

Code: Select all

<tr>
                <th class="rowHeader">
                    <asp:Label ID="BatchLabelTop" runat="server" Text="Update Selected Orders:" SkinID="FieldHeader" AssociatedControlID="BatchActionTop"></asp:Label>
                </th>
                <td>
                    <asp:DropDownList ID="BatchActionTop" runat="server">
                        <asp:ListItem Text=""></asp:ListItem>
                        <asp:ListItem Text="Process Payment" Value="PAY"></asp:ListItem>
                        <asp:ListItem Text="Mark Shipped" Value="SHIP"></asp:ListItem>
                        <asp:ListItem Text="Cancel" Value="CANCEL"></asp:ListItem>
                        <asp:ListItem Text="-----------"></asp:ListItem>
                        <asp:ListItem Text="Print Driver Sheet" Value="DRIVER"></asp:ListItem>
                        <asp:ListItem Text="Print Pull Sheet" Value="PULLSHEET"></asp:ListItem>
                        <asp:ListItem Text="-----------"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Button ID="BatchButtonTop" runat="server" Text="GO" OnClick="BatchButtonTop_Click" />
                </td>
            </tr>

mouse_8b
Commander (CMDR)
Commander (CMDR)
Posts: 115
Joined: Mon Oct 11, 2010 1:21 pm
Location: Austin, TX
Contact:

Re: Order Manager does not reload data after batch operation.

Post by mouse_8b » Mon Feb 24, 2014 10:51 am

Got it. I didn't have the new drop down in the update panel. Once I moved it, it works fine.

Post Reply