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
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>