[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

<Asp: Table  and UpdateCommand not working

Posted on 2012-09-05
11
Medium Priority
?
329 Views
Last Modified: 2012-10-20
Hi, The update command is not being called in the following code. It works when I use html table tags but stops working when I used the <asp:table> tag.

Can someone please assist?

   <asp:FormView ID="fvShip" runat="server" DataSourceID="sdsShipDetail" CellPadding="0">
                        <EditItemTemplate>
                          <asp:Table ID="teShipDetails" CssClass="black_text" Width="100%" runat="server" DataKeyName="ShipKey">
                                  <asp:TableRow>
                                      <asp:TableCell>CEVA Control Nbr:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4"><asp:Label ID="lblShipKey" runat="server" Text='<%# Bind("Ship_Key") %>' CssClass="form"
                                            Visible="true"></asp:Label>  </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Plant:  </asp:TableCell>
                                     <asp:TableCell ColumnSpan="4"><asp:DropDownList ID="ddlPlant" runat="server" DataSourceID="sdsPlant" SelectedValue='<%# Bind("Plant_Name")%>' DataTextField="Plant_Name"
                            DataValueField="Plant_Name" CssClass="form" AutoPostBack="False" >
                        </asp:DropDownList>&nbsp;
                        <asp:SqlDataSource ID="sdsPlant" runat="server" ConnectionString="<%$ ConnectionStrings:BusDevConnectionString %>"
                            SelectCommand="View_Plant_DD_Dell" SelectCommandType="StoredProcedure"></asp:SqlDataSource> 
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Date Issued:  </asp:TableCell>
                                     <asp:TableCell ColumnSpan="4"><asp:TextBox ID="txtTargetDate" Text='<%# Bind("Ship_Date") %>' runat="server" CssClass="form"></asp:TextBox>
                        <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtTargetDate">
                        </ajaxToolkit:CalendarExtender>
                        <asp:RequiredFieldValidator  Font-Bold="true" id="RequiredFieldValidator2" ControlToValidate="txtTargetDate" ErrorMessage="Target Date " ValidationGroup="Ship" Display="Static" InitialValue=""  SetFocusOnError="true"  runat="server">
                            * Target date is mandatory
                        </asp:RequiredFieldValidator>
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Type of Movement:  </asp:TableCell>
                                     <asp:TableCell ColumnSpan="4"><asp:DropDownList ID="ddlMovement" SelectedValue='<%# Bind("Movement_Name")%>'  runat="server" DataSourceID="sdsMovement" DataTextField="Movement_Name"
                            DataValueField="Movement_Name" CssClass="form" AutoPostBack="False" OnSelectedIndexChanged="ddlMovement_SelectedIndexChanged">
                        </asp:DropDownList>&nbsp;
                        <asp:SqlDataSource ID="sdsMovement" runat="server" ConnectionString="<%$ ConnectionStrings:BusDevConnectionString %>"
                            SelectCommand="View_Movement_DD_Dell" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow ID="reShipper">
                                      <asp:TableCell>Shipper Number / Return to Plant / Sort / IP:  </asp:TableCell>
                                     <asp:TableCell ColumnSpan="4"><asp:TextBox ID="txtShipper" runat="server" CssClass="form" Width="200px" Text='<%# Bind("Ship_Nbr") %>'></asp:textbox>
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Ship To / Destination:  </asp:TableCell>
                                     <asp:TableCell ColumnSpan="4"><asp:DropDownList ID="ddlDestination" SelectedValue='<%# Bind("Destination_Name")%>'  runat="server" DataSourceID="sdsDestination" DataTextField="Destination_Name"
                            DataValueField="Destination_Name" CssClass="form" AutoPostBack="false">
                        </asp:DropDownList>&nbsp;
                        <asp:SqlDataSource ID="sdsDestination" runat="server" ConnectionString="<%$ ConnectionStrings:BusDevConnectionString %>"
                            SelectCommand="View_Destination_ShipTo_DD_Dell" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Zip Code:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4"><asp:label ID="txtZipCode" runat="server" Text='<%# Eval("Zip_Code") %>' CssClass="form" Width="100px"></asp:Label>
                                      </asp:TableCell>
                                  </asp:TableRow>
                                    <asp:TableRow>
                                      <asp:TableCell>Scac Code:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4"><asp:Label ID="Label14" runat="server" Text='<%# Eval("Scac_Code") %>'  CssClass="form"></asp:Label>  </asp:TableCell>
                                   </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Carrier:   </asp:TableCell>
                                     <asp:TableCell ColumnSpan="4"><asp:DropDownList ID="ddlCarrier" runat="server" SelectedValue='<%# Bind("Carrier_Name")%>' DataSourceID="sdsCarrier" DataTextField="Carrier_Name"
                            DataValueField="Carrier_Name" CssClass="form" AutoPostBack="false">
                        </asp:DropDownList>&nbsp;
                        <asp:SqlDataSource ID="sdsCarrier" runat="server" ConnectionString="<%$ ConnectionStrings:BusDevConnectionString %>"
                            SelectCommand="View_Carrier_SCAC_DD_Dell" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                                      </asp:TableCell>
                                  </asp:TableRow>
                                
                                  <asp:TableRow>
                                      <asp:TableCell>Analyst:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4"><asp:label ID="lblAnalyst"  runat="server"  Text='<%# Eval("Analyst") %>' CssClass="form"></asp:Label>
                                        
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Time Issued to Shipping:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4"><asp:TextBox runat="server" CssClass="form" ID="txtIssueTime" Width="35" MaxLength="5" Text='<%# Bind("Time_Issued") %>' ></asp:TextBox>
                                         <asp:RegularExpressionValidator SetFocusOnError="true" ID="revtxtIssueTime" ControlToValidate="txtIssueTime"
                            ErrorMessage="Issue Time " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana"
                            Font-Size="11px" ValidationGroup="Ship" runat="server">
                        Ex: 17:05 | 5:05 | 02:59.
                        </asp:RegularExpressionValidator> 
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Window Time:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" CssClass="form" ID="txtWindowTime" Width="35" MaxLength="5" Text='<%# Bind("Window_Time") %>' ></asp:TextBox>
                                     <asp:RegularExpressionValidator SetFocusOnError="true" ID="RegularExpressionValidator2" ControlToValidate="txtWindowTime"
                            ErrorMessage="Window Time " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana"
                            Font-Size="11px" ValidationGroup="Ship" runat="server">
                        Ex: 17:05 | 5:05 | 02:59.
                        </asp:RegularExpressionValidator> 
                                      </asp:TableCell>
                                  </asp:TableRow>
                                   <asp:TableRow>
                                      <asp:TableCell>Window Time Ends:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" CssClass="form" ID="txtWindowTimeEnds" Width="35" MaxLength="5" Text='<%# Bind("Window_Time_Ends") %>' ></asp:TextBox>
                                     <asp:RegularExpressionValidator SetFocusOnError="true" ID="RegularExpressionValidator6" ControlToValidate="txtWindowTimeEnds"
                            ErrorMessage="Window Time Ends" ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana"
                            Font-Size="11px" ValidationGroup="Ship" runat="server">
                        Ex: 17:05 | 5:05 | 02:59.
                        </asp:RegularExpressionValidator> 
                                      </asp:TableCell>
                                  </asp:TableRow>
                               
                                   <asp:TableRow>
                                      <asp:TableCell>Status:  </asp:TableCell>
                                     <asp:TableCell ColumnSpan="4"><asp:DropDownList ID="ddlStatus" runat="server" DataSourceID="sdsStatus" SelectedValue='<%# Bind("Status_Name")%>' DataTextField="Status_Name"
                            DataValueField="Status_Name" CssClass="form" AutoPostBack="False" >
                        </asp:DropDownList>&nbsp;
                        <asp:SqlDataSource ID="sdsStatus" runat="server" ConnectionString="<%$ ConnectionStrings:BusDevConnectionString %>"
                            SelectCommand="View_Status_DD_Dell" SelectCommandType="StoredProcedure"></asp:SqlDataSource> 
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Trailer:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4"><asp:TextBox ID="txtTrailer" runat="server" Text='<%# Bind("Trailer") %>' CssClass="form" Width="100px"></asp:TextBox>
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Door:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4"><asp:TextBox ID="txtDoor"  runat="server" Text='<%# Bind("Door") %>' CssClass="form" Width="100px"></asp:TextBox>
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Pick Up Date:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4"><asp:TextBox ID="txtPUDate" runat="server" Text='<%# Bind("Pick_Up_Date") %>' CssClass="form"></asp:TextBox>
                                        <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtPUDate">
                        </ajaxToolkit:CalendarExtender>
                        <asp:RequiredFieldValidator  Font-Bold="true" id="RequiredFieldValidator7" ControlToValidate="txtPUDate" ErrorMessage="Target Date " ValidationGroup="Ship" Display = "Dynamic" InitialValue="" Width="100%" SetFocusOnError="true"  runat="server">
                            * Target date is mandatory
                        </asp:RequiredFieldValidator>
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow ID="rEMXDocsReceived">
                                      <asp:TableCell>MX Docs Received:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" ID="txtDriverArrivalTime" Text='<%# Bind("Driver_Arrival_Time") %>' CssClass="form" Width="35" MaxLength="5" AutoPostBack="false" OnTextChanged="change"></asp:TextBox>
                                        <asp:RegularExpressionValidator SetFocusOnError="true" ID="RegularExpressionValidator8" ControlToValidate="txtDriverArrivalTime" ErrorMessage="US Docs Received " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana" Font-Size="11px" ValidationGroup="Ship" runat="server"> Ex: 17:05 | 5:05 | 02:59. </asp:RegularExpressionValidator> 
                                        <asp:RequiredFieldValidator id="RequiredFieldValidator13" ControlToValidate="txtDriverArrivalTime" ErrorMessage="MX Docs Received " ValidationGroup="Time" InitialValue=""  SetFocusOnError="true"  runat="server">Needs a valid time.</asp:RequiredFieldValidator>                                          
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow ID="rEUSDocsReceived">
                                      <asp:TableCell>US Docs Received:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" ID="txtLoadTime" Text='<%# Bind("Load_Time") %>' CssClass="form" Width="35" MaxLength="5" AutoPostBack="false" OnTextChanged="change"></asp:TextBox>
                                        <asp:RegularExpressionValidator SetFocusOnError="true" ID="RegularExpressionValidator7" ControlToValidate="txtLoadTime" ErrorMessage="US Docs Received " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana" Font-Size="11px" ValidationGroup="Ship" runat="server"> Ex: 17:05 | 5:05 | 02:59. </asp:RegularExpressionValidator> 
                                        <asp:RequiredFieldValidator id="RequiredFieldValidator12" ControlToValidate="txtLoadTime" ErrorMessage="US Docs Received " ValidationGroup="Time" InitialValue=""  SetFocusOnError="true"  runat="server">Needs a valid time.</asp:RequiredFieldValidator>                                          
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Pick Up Time:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" ID="txtPUTime" Text='<%# Bind("Pick_Up_Time") %>' CssClass="form" Width="35" MaxLength="5" AutoPostBack="true" OnTextChanged="change"></asp:TextBox>
                                        <asp:RegularExpressionValidator SetFocusOnError="true" ID="RegularExpressionValidator3" ControlToValidate="txtPUTime" ErrorMessage="Pick Up Time " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana" Font-Size="11px" ValidationGroup="Ship" runat="server"> Ex: 17:05 | 5:05 | 02:59. </asp:RegularExpressionValidator> 
                                        <asp:RequiredFieldValidator id="rfvPUTime" ControlToValidate="txtPUTime" ErrorMessage="Pick Up Time " ValidationGroup="Time" InitialValue=""  SetFocusOnError="true"  runat="server">Needs a valid time.</asp:RequiredFieldValidator>                                          
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell><asp:Label runat="server" ID="lblRC" Text="Reason Code: " ForeColor="Red" Font-Bold="true" ></asp:Label>  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:DropDownList ID="ddlReason" runat="server" DataSourceID="sdsReason" DataTextField="Reason_Name" SelectedValue='<%# Bind("Reason_Name")%>' ForeColor="White" Font-Bold="true" BackColor="red" DataValueField="Reason_Name" CssClass="form" AutoPostBack="false" ></asp:DropDownList>&nbsp;
                                        <asp:SqlDataSource ID="sdsReason" runat="server" ConnectionString="<%$ ConnectionStrings:BusDevConnectionString %>" SelectCommand="View_Reason_DD_Dell" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                                      </asp:TableCell>
                                  </asp:TableRow>                                
                                   <asp:TableRow ID="rEDepartedFoxconn">
                                      <asp:TableCell>Departed Foxconn:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                       <asp:TextBox runat="server" ID="txtDepartedFoxconn" Text='<%# Bind("Departed_Foxconn") %>' CssClass="form" Width="35" MaxLength="5"></asp:TextBox>
                                       <asp:RegularExpressionValidator SetFocusOnError="true" ID="RegularExpressionValidator9" ControlToValidate="txtDepartedFoxconn" ErrorMessage="Departed Foxconn " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana" Font-Size="11px" ValidationGroup="Ship" runat="server"> Ex: 17:05 | 5:05 | 02:59. </asp:RegularExpressionValidator> 
                                       <asp:RequiredFieldValidator id="rfvDepartedFC" ControlToValidate="txtDepartedFoxconn" ErrorMessage="Departed Foxconn " ValidationGroup="Time" InitialValue=""  SetFocusOnError="true"  runat="server">Needs a valid time.</asp:RequiredFieldValidator>                                          
                                      </asp:TableCell>
                                  </asp:TableRow>
                                   <asp:TableRow ID="rEArrivedMexico">
                                      <asp:TableCell>Arrived in Mexico Customs:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" ID="txtArrivedMexico" Text='<%# Bind("Arrived_Mexico") %>' CssClass="form" Width="35" MaxLength="5"></asp:TextBox>
                                        <asp:RegularExpressionValidator SetFocusOnError="true" ID="RegularExpressionValidator10" ControlToValidate="txtArrivedMexico" ErrorMessage=" Arrived in Mexico Customs " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana" Font-Size="11px" ValidationGroup="Ship" runat="server"> Ex: 17:05 | 5:05 | 02:59. </asp:RegularExpressionValidator> 
                                        <asp:RequiredFieldValidator  id="rfvArrivedmexico" ControlToValidate="txtArrivedMexico" ErrorMessage="Arrived in Mexico Customs " ValidationGroup="Time" InitialValue=""  SetFocusOnError="true"  runat="server">Needs a valid time.</asp:RequiredFieldValidator>                                          
                                      </asp:TableCell>
                                  </asp:TableRow>                                
                                   <asp:TableRow>
                                      <asp:TableCell>Departed Mexico Customs:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" ID="txtDepartedMexico" Text='<%# Bind("Departed_Mexico") %>' CssClass="form" Width="35" MaxLength="5"></asp:TextBox>
                                        <asp:RegularExpressionValidator SetFocusOnError="true" ID="RegularExpressionValidator11" ControlToValidate="txtDepartedMexico" ErrorMessage="Departed Mexico Customs " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana" Font-Size="11px" ValidationGroup="Ship" runat="server"> Ex: 17:05 | 5:05 | 02:59. </asp:RegularExpressionValidator> 
                                        <asp:RequiredFieldValidator  id="rfvDepartedMexico" ControlToValidate="txtDepartedMexico" ErrorMessage="Departed Mexico Customs " ValidationGroup="Time" InitialValue=""  SetFocusOnError="true"  runat="server">Needs a valid time.</asp:RequiredFieldValidator>                                          
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow>
                                      <asp:TableCell>Arrived in US Customs:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" ID="txtArrivedUS" Text='<%# Bind("Arrived_US") %>' CssClass="form" Width="35" MaxLength="5"></asp:TextBox>
                                        <asp:RegularExpressionValidator SetFocusOnError="true" ID="RegularExpressionValidator12" ControlToValidate="txtArrivedUS" ErrorMessage="Arrived in US Customs " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana" Font-Size="11px" ValidationGroup="Ship" runat="server"> Ex: 17:05 | 5:05 | 02:59. </asp:RegularExpressionValidator> 
                                        <asp:RequiredFieldValidator  id="rfvArrivedUS" ControlToValidate="txtArrivedUS" ErrorMessage="Arrived in US Customs " ValidationGroup="Time" InitialValue=""  SetFocusOnError="true"  runat="server">Needs a valid time.</asp:RequiredFieldValidator>                                          
                                      </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow ID="rEDepartedUS">
                                      <asp:TableCell>Departed US Customs:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" ID="txtDepartedUS" Text='<%# Bind("Departed_US") %>' CssClass="form" Width="35" MaxLength="5"></asp:TextBox>
                                        <asp:RegularExpressionValidator SetFocusOnError="true" ID="RegularExpressionValidator13" ControlToValidate="txtDepartedUS" ErrorMessage="Departed US Customs " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana" Font-Size="11px" ValidationGroup="Ship" runat="server">Ex: 17:05 | 5:05 | 02:59.</asp:RegularExpressionValidator>                              
                                        <asp:RequiredFieldValidator  id="rfvDepartedUS" ControlToValidate="txtDepartedUS" ErrorMessage="Departed US Customs " ValidationGroup="Time" InitialValue=""  SetFocusOnError="true"  runat="server">Needs a valid time.</asp:RequiredFieldValidator>                                          
                                      </asp:TableCell>
                                  </asp:TableRow>
                                
                                   <asp:TableRow ID="rEDOTInspection">
                                      <asp:TableCell>TROOPER/DOT Inspection:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" ID="txtDotInspection" Text='<%# Bind("DOT_Inspection") %>' CssClass="form" Width="35" MaxLength="5"></asp:TextBox>
                                        <asp:RegularExpressionValidator SetFocusOnError="true" ID="RegularExpressionValidator1" ControlToValidate="txtDotInspection" ErrorMessage="TROOPER/DOT Inspection " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana" Font-Size="11px" ValidationGroup="Ship" runat="server">Ex: 17:05 | 5:05 | 02:59. </asp:RegularExpressionValidator>                       
                                        <asp:RequiredFieldValidator  id="rfvDot" ControlToValidate="txtDotInspection" ErrorMessage="TROOPER/DOT Inspection " ValidationGroup="Time" InitialValue=""  SetFocusOnError="true"  runat="server">Needs a valid time.</asp:RequiredFieldValidator>                                          
                                      </asp:TableCell>
                                  </asp:TableRow>
                                   <asp:TableRow ID="rEDOTRelease">
                                      <asp:TableCell>TROOPER/DOT Release Time:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" ID="txtDotRelease" Text='<%# Bind("DOT_Release") %>' CssClass="form" Width="35" MaxLength="5"></asp:TextBox>
                                        <asp:RegularExpressionValidator SetFocusOnError="true" ID="revTrooper" ControlToValidate="txtDotRelease" ErrorMessage="TROOPER/DOT Release Time " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$" Display = "Dynamic" Font-Names="Verdana" Font-Size="11px" ValidationGroup="Ship" runat="server">Ex: 17:05 | 5:05 | 02:59.</asp:RegularExpressionValidator> 
                                        <asp:RequiredFieldValidator  id="rfvTrooper" Display="Dynamic" ControlToValidate="txtDotRelease" ErrorMessage="TROOPER/DOT Release Time " ValidationGroup="Time" InitialValue=""  SetFocusOnError="true"  runat="server">Needs a valid time.</asp:RequiredFieldValidator>                                          
                                      </asp:TableCell>
                                  </asp:TableRow>                                
                                   <asp:TableRow>
                                      <asp:TableCell>Arrived at El Paso Terminal:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox runat="server" ID="txtArrivedElPaso" Text='<%# Bind("Arrived_ElPaso") %>' CssClass="form" Width="35" MaxLength="5"></asp:TextBox>
                                        <asp:RegularExpressionValidator Display=Dynamic SetFocusOnError="true" ID="revArrivedElPaso" ControlToValidate="txtArrivedElPaso" ErrorMessage="Arrived at El Paso Terminal " ValidationExpression="^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$"  Font-Names="Verdana" Font-Size="11px" ValidationGroup="Ship" runat="server">Ex: 17:05 | 5:05 | 02:59.</asp:RegularExpressionValidator>
                                        <asp:RequiredFieldValidator  id="rfvArrivedElPaso" Display="Dynamic" ControlToValidate="txtArrivedElPaso" ErrorMessage="Arrived at El Paso Terminal " ValidationGroup="Time" InitialValue=""  SetFocusOnError="true"  runat="server">Needs a valid time.</asp:RequiredFieldValidator>                                          
                                      </asp:TableCell>
                                  </asp:TableRow>     
                                  <asp:TableRow ID="rEComments">
                                      <asp:TableCell>Comments:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:TextBox ID="txtComments" runat="server" width="300" TextMode="MultiLine"  Text='<%# Bind("Comments") %>' CssClass="form"></asp:TextBox>
                                      </asp:TableCell>
                                  </asp:TableRow>                                
                                     <asp:TableRow ID="rEUpload1">
                                      <asp:TableCell><asp:Label ID="Label6" runat="server" Text="Upload File"></asp:Label>  </asp:TableCell>
                                      <asp:TableCell><asp:FileUpload ID="FileUpload" runat="server" CssClass="form" AutoPostBack="true" Visible="false"  />  </asp:TableCell>
                                      <asp:TableCell><asp:Label ID="lblFileLength" runat="server" Text='<%# Eval("File_Length") %>' CssClass="form" Visible="false"></asp:Label>  </asp:TableCell>
                                      <asp:TableCell><asp:LinkButton id="bLink"  runat="server"  Text="View File" AutoPostBack="true" OnClick="bLink_Click" />  </asp:TableCell>
                                      <asp:TableCell><asp:checkbox id="chkLink" CssClass="form"  runat="server" Text="Overwrite existing file" AutoPostBack="true" OnCheckedChanged="checkZero" />                                          </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow ID="rEUpload2">
                                      <asp:TableCell><asp:Label ID="Label5" runat="server" Text="Upload File"></asp:Label>  </asp:TableCell>
                                      <asp:TableCell><asp:FileUpload ID="FileUpload1" runat="server" CssClass="form" AutoPostBack="true" Visible="false"  />  </asp:TableCell>
                                      <asp:TableCell><asp:Label ID="lblFileLength1" runat="server" Text='<%# Eval("File_Length1") %>' CssClass="form" Visible="false"></asp:Label>  </asp:TableCell>
                                      <asp:TableCell><asp:LinkButton id="bLink1"  runat="server"  Text="View File" AutoPostBack="true"  OnClick="bLink1_Click"/>  </asp:TableCell>
                                       <asp:TableCell><asp:checkbox  id="chkLink1" CssClass="form"  runat="server" Text="Overwrite existing file"  AutoPostBack="true" OnCheckedChanged="checkOne"  />                                          </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow ID="rEUpload3">
                                      <asp:TableCell><asp:Label ID="Label4" runat="server" Text="Upload File"></asp:Label>  </asp:TableCell>
                                      <asp:TableCell><asp:FileUpload ID="FileUpload2" runat="server" CssClass="form" AutoPostBack="true" Visible="false" />  </asp:TableCell>
                                      <asp:TableCell><asp:Label ID="lblFileLength2" runat="server" Text='<%# Eval("File_Length2") %>' CssClass="form" Visible="false"></asp:Label>  </asp:TableCell>
                                      <asp:TableCell><asp:LinkButton id="bLink2"  runat="server"  Text="View File" AutoPostBack="true"  OnClick="bLink2_Click" />  </asp:TableCell>
                                      <asp:TableCell><asp:checkbox  id="chkLink2" CssClass="form"  runat="server" Text="Overwrite existing file"  AutoPostBack="true" OnCheckedChanged="checkTwo"  />                                          </asp:TableCell>
                                 </asp:TableRow>
                                  <asp:TableRow ID="rEUpload4">
                                      <asp:TableCell><asp:Label ID="Label3" runat="server" Text="Upload File"></asp:Label>  </asp:TableCell>
                                      <asp:TableCell><asp:FileUpload ID="FileUpload3" runat="server" CssClass="form" AutoPostBack="true" Visible="false"  />  </asp:TableCell>
                                      <asp:TableCell><asp:Label ID="lblFileLength3" runat="server" Text='<%# Eval("File_Length3") %>' CssClass="form" Visible="false"></asp:Label>  </asp:TableCell>
                                      <asp:TableCell><asp:LinkButton id="bLink3"  runat="server"  Text="View File" AutoPostBack="true" OnClick="bLink3_Click" />  </asp:TableCell>
                                      <asp:TableCell><asp:checkbox  id="chkLink3" CssClass="form"  runat="server" Text="Overwrite existing file"  AutoPostBack="true" OnCheckedChanged="checkThree" />                                          </asp:TableCell>
                                  </asp:TableRow>
                                  <asp:TableRow ID="rEUpload5">
                                      <asp:TableCell><asp:Label ID="Label2" runat="server" Text="Upload File"></asp:Label>  </asp:TableCell>
                                      <asp:TableCell><asp:FileUpload ID="FileUpload4" runat="server" CssClass="form" Visible="false" AutoPostBack="true"  />  </asp:TableCell>
                                      <asp:TableCell><asp:Label ID="lblFileLength4" runat="server" Text='<%# Eval("File_Length4") %>' CssClass="form" Visible="false"></asp:Label>  </asp:TableCell>
                                      <asp:TableCell><asp:LinkButton id="bLink4"  runat="server"  Text="View File" AutoPostBack="true" OnClick="bLink4_Click" />  </asp:TableCell>
                                       <asp:TableCell><asp:checkbox  id="chkLink4" CssClass="form"  runat="server" Text="Overwrite existing file"  AutoPostBack="true" OnCheckedChanged="checkFour"  />                                          </asp:TableCell>
                                   </asp:TableRow>
                                 
                                  <asp:TableRow>
                                      <asp:TableCell>Close Shipment:  </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">                                    
                                     <asp:CheckBox ID="chkClosed"  runat="server" Checked='<%# Bind("Closed") %>' AutoPostBack="True" OnCheckedChanged="checkClosed" CssClass="form"  
                                     onClick="CheckCheckboxes()" CausesValidation="true" ValidationGroup="Time"  ></asp:CheckBox><asp:Label ID="lblClosedTime" runat="server" Visible="true" CssClass="form" Text='<%# Bind("Closed_Time") %>' > </asp:Label>
                                   </asp:TableCell>
                                  </asp:TableRow>
                                 <%--  </asp:TableRow>
                                      <asp:TableCell>
                                        Delete Shipment:
                                      </asp:TableCell>
                                       <asp:TableCell ColumnSpan="4">
                                        <asp:CheckBox ID="chkDeleted"  runat="server" Checked='<%# Bind("Deleted") %>'
                                            CssClass="form" />
                                      </asp:TableCell>
                                  </asp:TableRow>--%>
                                  <asp:TableRow>
                                      <asp:TableCell>
                                        <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" ValidationGroup="PIRUpdate"  
                                            CommandName="Update" Text="Update" ></asp:LinkButton>
                                      </asp:TableCell>
                                      <asp:TableCell ColumnSpan="4">
                                        <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                                            Text="Cancel"></asp:LinkButton>
                                      </asp:TableCell>
                                  </asp:TableRow>
                                </asp:Table>
                            <div>
                            </div>
                        </EditItemTemplate>

Open in new window


I omitted the itemtemplate to save space

 </asp:FormView>
                    <asp:SqlDataSource ID="sdsShipDetail" runat="server" ConnectionString="<%$ ConnectionStrings:BusDevConnectionString %>"
                        SelectCommand="View_Ship_Detail_FV_Dell" UpdateCommand="Update_Ship_Detail_FV_Dell" UpdateCommandType="StoredProcedure"
                        SelectCommandType="StoredProcedure">
                        <SelectParameters>
                            <asp:QueryStringParameter Name="Ship_Key" QueryStringField="Key" Type="Int32" />
                        </SelectParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="Ship_Key" Type="Int32" />
                            <asp:Parameter Name="Plant_Name" Type="String" />
                            <asp:Parameter Name="Ship_Date" Type="DateTime" />
                            <asp:Parameter Name="Movement_Name" Type="String" />
                            <asp:Parameter Name="Ship_Nbr" Type="String" />
                            <asp:Parameter Name="Destination_Name" Type="String" />
                            <asp:Parameter Name="Carrier_Name" Type="String" />                            
                            <asp:Parameter Name="Time_Issued" Type="DateTime" />
                            <asp:Parameter Name="Window_Time" Type="DateTime" />
                            <asp:Parameter Name="Window_Time_Ends" Type="DateTime" />
                            <asp:Parameter Name="Status_Name" Type="String" />
                            <asp:Parameter Name="Trailer" Type="String" />
                            <asp:Parameter Name="Door" Type="String" />
                            <asp:Parameter Name="Pick_Up_Date" Type="DateTime" />
                            <asp:Parameter Name="Driver_Arrival_Time" Type="DateTime" />
                            <asp:Parameter Name="Load_Time" Type="DateTime" />
                            <asp:Parameter Name="Pick_Up_Time" Type="DateTime" />
                            <asp:Parameter Name="Reason_Name" Type="String" />
                            <asp:Parameter Name="Departed_Foxconn" Type="DateTime" />
                            <asp:Parameter Name="Arrived_Mexico" Type="DateTime" />                            
                            <asp:Parameter Name="Departed_Mexico" Type="DateTime" />
                            <asp:Parameter Name="Arrived_US" Type="DateTime" />
                            <asp:Parameter Name="Departed_US" Type="DateTime" />
                            <asp:Parameter Name="DOT_Inspection" Type="DateTime" />
                            <asp:Parameter Name="DOT_Release" Type="DateTime" />
                            <asp:Parameter Name="Arrived_ElPaso" Type="DateTime" />                                                        
                            <asp:Parameter Name="Comments" Type="String" />
                            <asp:Parameter Name="Closed" />
                            <%--<asp:Parameter Name="Deleted" />--%>
                            <asp:Parameter Name="File"/>
                            <asp:Parameter Name="File_Name" />
                            <asp:Parameter Name="File1" />
                            <asp:Parameter Name="File_Name1" />
                            <asp:Parameter Name="File2" />
                            <asp:Parameter Name="File_Name2" />
                            <asp:Parameter Name="File3" />
                            <asp:Parameter Name="File_Name3" />
                            <asp:Parameter Name="File4" />
                            <asp:Parameter Name="File_Name4" />
                            <asp:Parameter Name="Closed_Time" Type="DateTime" />
                        </UpdateParameters>
                    </asp:SqlDataSource>

Open in new window

0
Comment
Question by:JessyRobinson1234
  • 6
  • 2
  • 2
10 Comments
 
LVL 26

Expert Comment

by:Alan Warren
ID: 38367352
Wondering if you should take your UpdateButton outside of the asp:table, but have it still inside the formview EditItemTemplate.
    </asp:Table>

    <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" ValidationGroup="PIRUpdate"  
        CommandName="Update" Text="Update" ></asp:LinkButton>
    <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" 
        CommandName="Cancel" Text="Cancel"></asp:LinkButton>
    </EditItemTemplate>
  </asp:FormView>

Open in new window

Possible the update command is being hand-balled to the asp:table event handlers.
Alan ";0)
0
 

Author Comment

by:JessyRobinson1234
ID: 38386791
Alan, thanks. I tried it but it didn't make a difference.
Any other suggestions?
0
 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 38387853
Hi,

It's pretty weird!

Try removing the server side comments <% -- - -%>

 
<%--  </asp:TableRow>
                                      <asp:TableCell>
                                        Delete Shipment:
                                      </asp:TableCell>
                                       <asp:TableCell ColumnSpan="4">
                                        <asp:CheckBox ID="chkDeleted"  runat="server" Checked='<%# Bind("Deleted") %>'
                                            CssClass="form" />
                                      </asp:TableCell>
                                  </asp:TableRow>--%>

Open in new window


Hope it helps u...
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:JessyRobinson1234
ID: 38388255
It did not :(
0
 
LVL 26

Expert Comment

by:Alan Warren
ID: 38388672
Hi Jessy,
Curious how you are handling the multiple invisible fileuploads, how are you parsing them into the db?

Wondering if it might be a good test to remove the fileuploads from the edititem template, modify your storedprocedure/sql and input parameters accordingly; and test if the update is successful without the binary fileupload data in the equation.

Given the code you have published here, I suspect the fileupload binary data is null, which would either cause your insert stored procedure to overwrite existing binary data with null, or cause the update to fail and rollback.

Alan
0
 

Author Comment

by:JessyRobinson1234
ID: 38389995
Alan,

It's all working fine when i revert the table syntax back to html tables e.g. <table></table>
as opposed to <asp:table></asp:table>
0
 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 38391067
Hi,

I think you are using the ID attribute in the <asp:TableRow>!

<asp:TableRow ID="reShipper">

Open in new window


but you didn't add runat="server" attribute! Try to add it and check!

<asp:TableRow ID="reShipper" runat="server" >

Open in new window


Hope it helps u...
0
 

Accepted Solution

by:
JessyRobinson1234 earned 0 total points
ID: 38496664
i reverted back to my old code where I used regular tables.
0
 

Author Comment

by:JessyRobinson1234
ID: 38496681
i reverted back to my old code where I used regular tables.
0
 

Author Closing Comment

by:JessyRobinson1234
ID: 38516879
I was able to make it work with a panel.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month20 days, 8 hours left to enroll

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question