I am trying to debug what is happening with the grid control. I have an master page, a content page where the grid is located, and it utilizes a custom edit form for updates/inserts. There is validation on the edit form, and on the main page, both of which are activated/deactivated by javascript depending on the content of the controls. The grid is AJAX enabled, using RadAjaxManager, and RadScriptBlocks are used for the javascript. It uses Business objects, using a Linq data source. It populates a collection that is used to populate the RadGrid. Manual Insert/Update/Delete events handle the data being sent to and from the business objects.
When all the fields are filled in, I can add/update records in the grid, and I can step into the events attached to insert and update. However, when some of the controls are empty, validators are deactivated, enabling others to be empty. In this situation, when I try to add/update records (delete is disabled at this point, because of validations and the inability to add records), the following things happen:
I'm not seeing any sql activity (custom business objects, tied to a linq source) when these errors come up. The Need Data Source event is also not being fired. I have breakpoints in the events, and they just aren't being reached.
Like I said, if the controls (text boxes, drop downs, etc.) on the main page (not the edit form) are filled in, then I can insert/update records, and the events are fired as I expect them to.
Is there any place I can step into, or insert into the code, to get a handle on what is happening? This is a very large application, so I'm unsure of what you want posted as far as code. I will put the code for the grid, and the edit form. Insert/Update/Delete seem to work, so I'll post what anyone needs to debug, if needed.
Thanks
Jay
Grid:
Edit Form:
When all the fields are filled in, I can add/update records in the grid, and I can step into the events attached to insert and update. However, when some of the controls are empty, validators are deactivated, enabling others to be empty. In this situation, when I try to add/update records (delete is disabled at this point, because of validations and the inability to add records), the following things happen:
- I click add, or update button
- Edit form appears, proper fields are displayed.
- I can add items to the edit form, validations appear to be working properly
- Click update button
- I cannot step into insert or delete event, because it's not firing.
- Grid completely disappears from the aspx page display.
- Refresh (F5) will restore the grid to it's original state, no record added.
I'm not seeing any sql activity (custom business objects, tied to a linq source) when these errors come up. The Need Data Source event is also not being fired. I have breakpoints in the events, and they just aren't being reached.
Like I said, if the controls (text boxes, drop downs, etc.) on the main page (not the edit form) are filled in, then I can insert/update records, and the events are fired as I expect them to.
Is there any place I can step into, or insert into the code, to get a handle on what is happening? This is a very large application, so I'm unsure of what you want posted as far as code. I will put the code for the grid, and the edit form. Insert/Update/Delete seem to work, so I'll post what anyone needs to debug, if needed.
Thanks
Jay
Grid:
| <table class="Info" cellpadding="0" cellspacing="0" > |
| <tr> |
| <td style="width: 100%"> |
| <Easi:EasiDataPanel ID="TelerikFreightLoadChargeDataPanel" runat="server" Width="765"> |
| <Easi:EasiButton ID="LoadFreightLoadChargesButton" |
| Text="Load Project Plan Freight Charges" |
| runat="server" |
| TableName="FreightLoad" FieldName="Id" |
| onclick="LoadFreightLoadChargesButton_Click" /> |
| <div style="height:100%; width:100%" id="RadGridContainer"> |
| <telerik:RadGrid ID="TelerikFreightLoadChargeRadGrid" runat="server" |
| AutoGenerateColumns="False" |
| GridLines="None" |
| onneeddatasource="TelerikFreightLoadChargeRadGrid_NeedDataSource" |
| ShowStatusBar="True" Font-Bold="False" Font-Italic="False" |
| Font-Overline="False" Font-Strikeout="False" Font-Underline="False" |
| HorizontalAlign="Right" |
| ondeletecommand="TelerikFreightLoadChargeRadGrid_DeleteCommand" |
| oninsertcommand="TelerikFreightLoadChargeRadGrid_InsertCommand" |
| onupdatecommand="TelerikFreightLoadChargeRadGrid_UpdateCommand" |
| onitemcreated="TelerikFreightLoadChargeRadGrid_ItemCreated" |
| onitemdatabound="TelerikFreightLoadChargeRadGrid_ItemDataBound" |
| ShowFooter="True" |
| onitemcommand="TelerikFreightLoadChargeRadGrid_ItemCommand"> |
| <MasterTableView CommandItemDisplay="Top" EditMode="EditForms" InsertItemDisplay="Top" |
| HorizontalAlign="Center" ShowGroupFooter="False" TableLayout="Fixed"> |
| <GroupByExpressions> |
| <telerik:GridGroupByExpression> |
| <SelectFields> |
| <telerik:GridGroupByField FieldName="CustomerId" HeaderText="Customer"/> |
| <telerik:GridGroupByField FieldAlias="ShipmentNumber" FieldName="ShipmentNumber" HeaderText="Shipment Number" /> |
| <telerik:GridGroupByField FieldName="FreightTypeId" HeaderText="Freight Type" /> |
| </SelectFields> |
| <GroupByFields> |
| <telerik:GridGroupByField FieldName="CustomerId" HeaderText="Customer" /> |
| <telerik:GridGroupByField FieldAlias="ShipmentNumber" FieldName="ShipmentNumber" HeaderText="Shipment Number" /> |
| <telerik:GridGroupByField FieldName="FreightTypeId" HeaderText="Freight Type"/> |
| </GroupByFields> |
| </telerik:GridGroupByExpression> |
| </GroupByExpressions> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="1px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn Visible="false"> |
| <HeaderStyle Width="1px" /> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" |
| DefaultInsertValue="" HeaderText="Id" SortExpression="Id" UniqueName="Id" |
| Visible="false"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="FreightLoadId" DataType="System.Int32" |
| DefaultInsertValue="" HeaderText="FreightLoadId" SortExpression="FreightLoadId" |
| UniqueName="FreightLoadId" Visible="false"> |
| </telerik:GridBoundColumn> |
| <telerik:GridDropDownColumn |
| DataField="FreightLoadChargeTypeId" |
| DataSourceID="FreightLoadChargeTypeObjectDataSource" |
| DefaultInsertValue="" |
| HeaderText="Freight Charge Type" |
| SortExpression="FreightLoadChargeTypeId" |
| UniqueName="FreightLoadChargeDropDownListColumn" |
| ListTextField="Name" |
| ListValueField="Id" |
| DropDownControlType="RadComboBox" |
| > |
| <HeaderStyle Width="75px" /> |
| </telerik:GridDropDownColumn> |
| <telerik:GridDropDownColumn |
| DataField="CustomerId" |
| DataSourceId="CustomerObjectDataSource" |
| DataType="System.Int32" |
| DefaultInsertValue="" |
| HeaderText="Customer" |
| SortExpression="Name" |
| UniqueName="Customer" |
| ListTextField="IdAndName" |
| ListValueField="Id" |
| Visible="false"> |
| <HeaderStyle Width="50px" /> |
| </telerik:GridDropDownColumn> |
| <telerik:GridTemplateColumn DataField="ChargeAgreementSegmentId" HeaderText="Agreement Segment" UniqueName="ChargeAgreementSegmentId"> |
| <ItemTemplate> |
| <asp:Label ID="ChargeAgreementSegmentIdLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ChargeAgreementSegmentId") %>'> |
| </asp:Label> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:DropDownList ID="ChargeAgreementSegmentIdDropDownList" runat="server" /> |
| <asp:RequiredFieldValidator ID="ChargeAgreementSegmentIdDropDownRequiredValidator" InitialValue="0" runat="server" ControlToValidate="ChargeAgreementSegmentIdDropDownList" ErrorMessage="Agreement Segment number is required" Display="Dynamic" Enabled="true" ></asp:RequiredFieldValidator> |
| </EditItemTemplate> |
| <HeaderStyle Width="60px" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridCheckBoxColumn DataField="Shipment" DataType="System.Boolean" |
| DefaultInsertValue="" HeaderStyle-Width="50px" HeaderText="Shipment" SortExpression="Shipment" |
| UniqueName="Shipment" |
| Visible="false"> |
| <HeaderStyle Width="50px" /> |
| </telerik:GridCheckBoxColumn> |
| <telerik:GridTemplateColumn DataField="ShipmentNumber" HeaderStyle-Width="50px" HeaderText="Shipment Number" UniqueName="ShipmentNumber" Visible="false"> |
| <ItemTemplate> |
| <asp:Label ID="ShipmentNumberLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ShipmentNumber") %>'> |
| </asp:Label> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:DropDownList ID="ShipmentNumberDropDownList" runat="server" /> |
| <asp:RequiredFieldValidator ID="ShipmentNumberDropDownRequiredValidator" InitialValue="0" runat="server" ControlToValidate="ShipmentNumberDropDownList" ErrorMessage="Shipment Number is required" Display="Dynamic" Enabled="true" ></asp:RequiredFieldValidator> |
| </EditItemTemplate> |
| <HeaderStyle Width="75px" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField="Distance" DataType="System.Int32" |
| DefaultInsertValue="" HeaderText="Distance" SortExpression="Distance" |
| UniqueName="Distance" Aggregate="Max" FooterText="Max Distance: " > |
| <HeaderStyle Width="40px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Weight" DataType="System.Int32" |
| DefaultInsertValue="" HeaderStyle-Width="50px" HeaderText="Weight" SortExpression="Weight" |
| UniqueName="Weight" Aggregate="Sum" FooterText="Total Weight: " > |
| <HeaderStyle Width="35px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="AllocatedFreightAmount" |
| DataType="System.Decimal" DefaultInsertValue="" |
| HeaderStyle-Width="45px" HeaderText="Carrier Invoice Allocation" SortExpression="AllocatedFreightAmount" |
| UniqueName="AllocatedFreightAmount" Aggregate="Sum" |
| FooterText="Total: " > |
| <HeaderStyle Width="50px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridDropDownColumn |
| DataField="FreightTypeId" |
| DataSourceID="FreightTypeObjectDataSource" |
| DefaultInsertValue="" HeaderStyle-Width="50px" |
| HeaderText="Freight Type" |
| SortExpression="FreightTypeId" |
| UniqueName="FreightTypeId" |
| ListTextField="Code" |
| ListValueField="Id" |
| Visible="false"> |
| <HeaderStyle Width="50px" /> |
| </telerik:GridDropDownColumn> |
| <telerik:GridBoundColumn DataField="ExchangeRate" DataType="System.Decimal" |
| DefaultInsertValue="" HeaderText="Exchange Rate" SortExpression="ExchangeRate" |
| UniqueName="ExchangeRate" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="StandardFreightAmount" |
| DataType="System.Decimal" DefaultInsertValue="" |
| HeaderText="Standard Freight Amount" SortExpression="StandardFreightAmount" |
| UniqueName="StandardFreightAmount" Aggregate="Sum" |
| FooterText="Standard Total: " |
| Visible="false" > |
| <HeaderStyle Width="50px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn |
| DataField="FinalFreightAmount" |
| HeaderText="Freight Charge" |
| UniqueName="FinalFreightAmount" |
| Aggregate="Sum" |
| FooterText="Freight Total: "> |
| <ItemTemplate> |
| <asp:Label ID="FinalFreightAmountLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "FinalFreightAmount") %>'> |
| </asp:Label> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:TextBox ID="FinalFreightAmountTextBox" runat="server"> |
| </asp:TextBox> |
| </EditItemTemplate> |
| <HeaderStyle Width="50px" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridDropDownColumn |
| DataField="CurrencyTypeId" |
| DataSourceID="CurrencyTypeObjectDataSource" |
| DefaultInsertValue="" |
| HeaderText="Cur" |
| SortExpression="CurrencyTypeId" |
| UniqueName="CurrencyTypeId" |
| ListTextField="Name" |
| ListValueField="Id" |
| Visible="false"> |
| <HeaderStyle Width="50px" /> |
| </telerik:GridDropDownColumn> |
| <telerik:GridDropDownColumn |
| DataField="CostCenterId" |
| DataSourceID="CostCenterObjectDataSource" |
| DefaultInsertValue="" HeaderStyle-Width="100px" |
| HeaderText="Cost Center" |
| SortExpression="CostCenterId" |
| UniqueName="CostCenterId" |
| ListTextField="Name" |
| ListValueField="Id"> |
| <HeaderStyle Width="75px" /> |
| </telerik:GridDropDownColumn> |
| <telerik:GridDropDownColumn |
| DataField="FreightAdjustmentReasonId" |
| DataSourceID="FreightAdjustObjectDataSource" |
| DefaultInsertValue="" |
| HeaderText="Reason Code" |
| SortExpression="FreightAdjustmentReasonId" |
| UniqueName="FreightAdjustmentReasonId" |
| ListTextField="Name" |
| ListValueField="Id"> |
| <HeaderStyle Width="75px" /> |
| </telerik:GridDropDownColumn> |
| <telerik:GridDropDownColumn |
| DataField="FreightExtraChargeTypeId" |
| DataSourceID="FreightExtraChargeTypeObjectDataSource" |
| DefaultInsertValue="" |
| HeaderText="Extra Charge Type" |
| SortExpression="FreightExtraChargeTypeId" |
| UniqueName="FreightExtraChargeTypeId" |
| ListTextField="Name" |
| ListValueField="Id" |
| Visible="false"> |
| <HeaderStyle Width="70px" /> |
| </telerik:GridDropDownColumn> |
| <telerik:GridBoundColumn DataField="Comments" DefaultInsertValue="" DataFormatString="<nobr>{0}</nobr>" |
| HeaderText="Comments" SortExpression="Comments" UniqueName="Comments" MaxLength="250"> |
| <HeaderStyle Width="55px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridButtonColumn UniqueName="EditColumn" CommandName="Edit" Text="Detail" > |
| <HeaderStyle Width="25px" /> |
| </telerik:GridButtonColumn> |
| <telerik:GridButtonColumn CommandName="Delete" Text="Delete" |
| UniqueName="deletecolumn"> |
| <HeaderStyle Width="35px" /> |
| </telerik:GridButtonColumn> |
| </Columns> |
| <EditFormSettings EditFormType="WebUserControl" UserControlName="FreightLoadChargeEditFormUserControl.ascx" > |
| <EditColumn UniqueName="EditCommandColumn1" > |
| </EditColumn> |
| </EditFormSettings> |
| <RowIndicatorColumn Display="false"></RowIndicatorColumn> |
| <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" /> |
| </MasterTableView> |
| <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" |
| VerticalAlign="Middle" Wrap="True" /> |
| <ClientSettings> |
| <Resizing EnableRealTimeResize="true" ClipCellContentOnResize="true" /> |
| <Selecting AllowRowSelect="True" /> |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" |
| SaveScrollPosition="False" ScrollHeight="" /> |
| <ClientEvents OnGridCreated="onGridCreated" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| </div> |
| </Easi:EasiDataPanel> |
| </td> |
| </tr> |
| </table> |
Edit Form:
| <Easi:EasiDataPanel ID="FreightLoadChargeInsertDataPanel" runat="server" > |
| <table id="EditFormTable" style="height:200px"> |
| <tr> |
| <td colspan="2"> |
| <b>Freight Load Charge Details:</b> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2"> |
| <asp:Label ID="FreightLoadChargeIdLabelLabel" runat="server" Text="Freight Charge ID: " ></asp:Label> |
| <asp:Label ID="FreightLoadChargeIdLabel" runat="server" Text='<%# Eval("Id") %>' ></asp:Label> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Label ID="FreightLoadChargeTypeLabel" runat="server" Text="Freight Charge Type: " ></asp:Label> |
| <asp:DropDownList ID="FreightLoadChargeTypeDropDownList" runat="server" TabIndex="0" ></asp:DropDownList > |
| <asp:RequiredFieldValidator ID="FreightLoadChargeTypeRequiredFieldValidator" runat="server" |
| Display="Dynamic" |
| ControlToValidate="FreightLoadChargeTypeDropDownList" |
| InitialValue="0" |
| Text="*" |
| Enabled="false" |
| ErrorMessage="Freight Charge Type is required." /> |
| </td> |
| <td> |
| <asp:Label ID="CustomerIdLabel" runat="server" Text="Customer:"></asp:Label> |
| <asp:DropDownList ID="CustomerIdDropDown" runat="server" TabIndex="1" ></asp:DropDownList> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2"> |
| <asp:Label ID="LinkFreightLoadChargeLabel" runat="server" Text="Link to Freight Load Charge:"></asp:Label> |
| <asp:DropDownList ID="LinkFreightLoadChargeDropDown" runat="server" TabIndex="2"></asp:DropDownList> |
| <asp:RequiredFieldValidator ID="LinkFreightLoadChargeDropDownRequiredFieldValidator" runat="server" |
| Display="Dynamic" |
| ControlToValidate="LinkFreightLoadChargeDropDown" |
| InitialValue="0" |
| Text="*" |
| Enabled="false" |
| ErrorMessage="Freight Load Charge Link is required." /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Label ID="ShipmentNumberLabel" runat="server" Text="Shipment/Return Number: " ></asp:Label> |
| <asp:DropDownList ID="ShipmentNumberDropDownList" runat="server" |
| TabIndex="3" ondatabinding="ShipmentNumberDropDownList_DataBinding" ></asp:DropDownList> |
| <asp:RequiredFieldValidator ID="ShipmentNumberDropDownListRequiredFieldValidator" runat="server" |
| Enabled="false" Display="Dynamic" ControlToValidate="ShipmentNumberDropDownList" InitialValue="0" |
| Text="*" ErrorMessage="Shipment Number is required." /> |
| </td> |
| <td> |
| <asp:Label ID="ShipmentCheckBoxLabel" runat="server" Text="Shipment: "></asp:Label> |
| <asp:CheckBox ID="ShipmentCheckBox" runat="server" TabIndex="4" |
| Checked='<%# Eval("Shipment").ToString()!="True"?false:true %>' /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Label ID="DistanceLabel" runat="server" Text="Distance (miles): "></asp:Label> |
| <asp:TextBox ID="DistanceTextBox" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Distance" ) %>' TabIndex="5" ></asp:TextBox> |
| <asp:RequiredFieldValidator ID="DistanceRequiredFieldValidator" runat="server" |
| Display="Dynamic" ControlToValidate="DistanceTextBox" Enabled="false" |
| Text="*" ErrorMessage="Distance is required." /> |
| <asp:CustomValidator ID="DistanceTextBoxCustomValidator" runat="server" |
| ControlToValidate="DistanceTextBox" |
| ClientValidationFunction="ClientValidate" |
| RegEx="^(\d{0,9})$" |
| ErrorMessage="The Distance Amount is not a valid value." Enabled="false" |
| Text="*" |
| Display="Dynamic" /> |
| </td> |
| <td> |
| <asp:Label ID="WeightLabel" runat="server" Text="Weight (lbs): "></asp:Label> |
| <asp:TextBox ID="WeightTextBox" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Weight" ) %>' TabIndex="6" ></asp:TextBox> |
| <asp:RequiredFieldValidator ID="WeightRequiredFieldValidator" runat="server" |
| Enabled="false" Display="Dynamic" ControlToValidate="WeightTextBox" |
| Text="*" ErrorMessage="Weight is required." /> |
| <asp:CustomValidator ID="WeightTextBoxCustomValidator" runat="server" |
| ControlToValidate="WeightTextBox" |
| ClientValidationFunction="ClientValidate" |
| RegEx="^(\d{0,9})$" |
| ErrorMessage="The Weight Amount is not a valid value." |
| Enabled="false" |
| Text="*" |
| Display="Dynamic" /> |
| <asp:RangeValidator ID="WeightTextBoxRangeValidator" runat="server" Enabled="false" |
| Display="Dynamic" ControlToValidate="WeightTextBox" MinimumValue="0" MaximumValue="999999" Text="*" |
| ErrorMessage="Weight must be between 0 and 999,999." /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Label ID="AllocatedFreightAmountLabel" runat="server" Text="Carrier Invoice Allocation: " ></asp:Label> |
| <asp:TextBox ID="AllocatedFreightAmountTextBox" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.AllocatedFreightAmount" ) %>' TabIndex="7" |
| onchanged="ConfirmCarrierInvoiceAllocationAmount" ></asp:TextBox> |
| <asp:RequiredFieldValidator ID="AllocatedFreightAmountTextBoxRequiredFieldValidator" runat="server" |
| Enabled="false" Display="Dynamic" ControlToValidate="AllocatedFreightAmountTextBox" |
| Text="*" ErrorMessage="Carrier Invoice Allocation is required." /> |
| <asp:CustomValidator ID="AllocatedFreightAmountTextBoxCustomValidator" runat="server" |
| ControlToValidate="AllocatedFreightAmountTextBox" |
| ClientValidationFunction="ClientValidate" |
| RegEx="^(\d{0,18}\.\d{0,2}|\d{0,18})$" |
| ErrorMessage="Carrier Invoice Allocation Amount is not a valid value." |
| Text="*" |
| Enabled="false" |
| Display="Dynamic" /> |
| <asp:RangeValidator ID="AllocatedFreightAmountTextBoxRangeValidator" runat="server" Enabled="false" |
| Display="Dynamic" ControlToValidate="AllocatedFreightAmountTextBox" MinimumValue="0" MaximumValue="999999" Text="*" |
| ErrorMessage="Carrier Invoice Allocation must be between 0 and 999,999." /> |
| </td> |
| <td> |
| <asp:Label ID="FreightAdjustmentReasonLabel" runat="server" Text="Reason Code: "></asp:Label> |
| <asp:DropDownList ID="FreightAdjustmentReasonDropDownList" runat="server" TabIndex="8" DataSourceID="FreightAdjustObjectDataSource" DataTextField="Name" DataValueField="Id" ></asp:DropDownList> |
| <asp:RequiredFieldValidator ID="FreightAdjustmentReasonDropDownListRequiredFieldValidator" runat="server" |
| Display="Dynamic" ControlToValidate="FreightAdjustmentReasonDropDownList" InitialValue="0" |
| Enabled="false" Text="*" ErrorMessage="Reason Code is required." /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Label ID="StandardFreightChargeLabelLabel" runat="server" Text="Standard Freight Charge: " ></asp:Label> |
| <asp:Label ID="StandardFreightChargeLabel" runat="server" Text='<%# Eval("StandardFreightAmount") %>' ></asp:Label> |
| </td> |
| <td> |
| <asp:Label ID="FreightTypeLabel" runat="server" Text="Freight Method: " ></asp:Label> |
| <asp:DropDownList ID="FreightTypeDropDownList" runat="server" TabIndex="9" ></asp:DropDownList> |
| <asp:RequiredFieldValidator ID="FreightTypeDropDownListRequiredFieldValidator" runat="server" |
| Display="Dynamic" ControlToValidate="FreightTypeDropDownList" InitialValue="0" |
| Enabled="false" Text="*" ErrorMessage="Freight Method is required." /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Label ID="FinalFreightAmountLabel" runat="server" Text="Adjusted Freight Charge: " ></asp:Label> |
| <asp:TextBox ID="FinalFreightAmountTextBox" runat="server" TabIndex="10" Text='<%# Eval("FinalFreightAmount") %>' ></asp:TextBox> |
| <asp:RequiredFieldValidator ID="FinalFreightAmountTextBoxRequiredFieldValidator" runat="server" |
| Display="Dynamic" ControlToValidate="FinalFreightAmountTextBox" Enabled="false" |
| Text="*" ErrorMessage="Freight Amount is required." /> |
| <asp:CustomValidator ID="FinalFreightAmountTextBoxCustomValidator" runat="server" |
| ControlToValidate="FinalFreightAmountTextBox" |
| ClientValidationFunction="ClientValidate" |
| RegEx="^(\d{0,18}\.\d{0,2}|\d{0,18})$" |
| ErrorMessage="Freight Amount is not a valid value." |
| Enabled="false" Text="*" |
| Display="Dynamic" /> |
| <asp:RangeValidator ID="FinalFreightAmountTextBoxRangeValidator" runat="server" |
| Display="Dynamic" ControlToValidate="FinalFreightAmountTextBox" MinimumValue="0" MaximumValue="999999" Enabled="false" Text="*" |
| ErrorMessage="Freight Amount must be between 0 and 999,999." /> |
| </td> |
| <td> |
| <asp:Label ID="ChargeAgreementSegmentLabel" runat="server" Text="Agreement Segment: "></asp:Label> |
| <asp:DropDownList ID="ChargeAgreementSegmentDropDownList" runat="server" |
| TabIndex="11" |
| ondatabinding="ChargeAgreementSegmentDropDownList_DataBinding" ></asp:DropDownList> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Label ID="CostCenterLabel" runat="server" Text="Cost Center: "></asp:Label> |
| <asp:DropDownList ID="CostCenterDropDownList" runat="server" TabIndex="12" ></asp:DropDownList> |
| <asp:RequiredFieldValidator ID="CostCenterDropDownListRequiredFieldValidator" runat="server" |
| Display="Dynamic" ControlToValidate="CostCenterDropDownList" InitialValue="0" |
| Enabled="false" Text="*" ErrorMessage="Cost Center is required." /> |
| </td> |
| <td> |
| <asp:Label ID="FreightExtraChargeTypeLabel" runat="server" Text="Extra Charge Type: "></asp:Label> |
| <asp:DropDownList ID="FreightExtraChargeTypeDropDownList" runat="server" TabIndex="13" DataSourceID="FreightExtraChargeTypeObjectDataSource" DataTextField="Name" DataValueField="Id" ></asp:DropDownList> |
| <asp:RequiredFieldValidator ID="FreightExtraChargeTypeDropDownListRequiredFieldValidator" runat="server" |
| Enabled="false" Display="Dynamic" ControlToValidate="FreightExtraChargeTypeDropDownList" InitialValue="0" |
| Text="*" ErrorMessage="Freight Extra Charge Type is required." /> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2"> |
| <asp:Label ID="CommentsLabel" runat="server" Text="Comments: "></asp:Label> |
| <asp:TextBox ID="CommentsTextBox" runat="server" TextMode="MultiLine" Rows="3" Columns="40" Text='<%# DataBinder.Eval( Container, "DataItem.Comments" ) %>' TabIndex="14" ></asp:TextBox> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2"> |
| <asp:Button ID="UpdateButton" Text="Update" runat="server" CommandName="Update" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>' TabIndex="15" /> |
| <asp:Button ID="InsertButton" Text="Insert" runat="server" CommandName="PerformInsert" Visible='<%# (DataItem is Telerik.Web.UI.GridInsertionObject) %>' TabIndex="16" /> |
| <asp:Button ID="CancelButton" Text="Cancel" runat="server" CommandName="Cancel" CausesValidation="false" TabIndex="17" /> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2"> |
| <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="true" ShowSummary="false" /> |
| </td> |
| </tr> |
| </table> |
| </Easi:EasiDataPanel> |
| <asp:ObjectDataSource ID="CostCenterObjectDataSource" runat="server" |
| onobjectcreating="CostCenterObjectDataSource_ObjectCreating" |
| SelectMethod="GetAll" |
| TypeName="Efco.Business.Data.CostCenterBL"></asp:ObjectDataSource> |
| <asp:ObjectDataSource ID="FreightLoadChargeTypeObjectDataSource" runat="server" |
| SelectMethod="GetAll" |
| TypeName="Efco.Business.Data.FreightLoadChargeTypeBL" |
| onobjectcreating="FreightLoadChargeTypeObjectDataSource_ObjectCreating"> |
| </asp:ObjectDataSource> |
| <asp:ObjectDataSource ID="FreightAdjustObjectDataSource" runat="server" |
| onobjectcreating="FreightAdjustObjectDataSource_ObjectCreating" |
| SelectMethod="GetActive" TypeName="Efco.Business.Data.FreightAdjustmentReasonBL"> |
| </asp:ObjectDataSource> |
| <asp:ObjectDataSource ID="FreightExtraChargeTypeObjectDataSource" |
| runat="server" SelectMethod="GetActive" |
| TypeName="Efco.Business.Data.FreightExtraChargeTypeBL" |
| onobjectcreating="FreightExtraChargeTypeObjectDataSource_ObjectCreating"> |
| </asp:ObjectDataSource> |
| <asp:ObjectDataSource |
| ID="ActiveCustomerObjectDataSource" |
| runat="server" |
| SelectMethod="GetActiveCustomerList" |
| TypeName="Efco.Business.Data.CustomerBL" |
| onobjectcreating="ActiveCustomerObjectDataSource_ObjectCreating"> |
| </asp:ObjectDataSource> |
| <asp:ObjectDataSource |
| ID="FreightTypeObjectDataSource" |
| runat="server" |
| SelectMethod="GetAll" |
| TypeName="Efco.Business.Data.FreightTypeBL" |
| onobjectcreating="FreightTypeObjectDataSource_ObjectCreating1" > |
| </asp:ObjectDataSource> |
| <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> |
| <script type="text/javascript"> |
| function InitializePage() { |
| FreightLoadChargeTypeSelected(); |
| } |
| function SwitchDistanceValidators(onOrOff) { |
| var displayVar = ''; |
| if (onOrOff) { |
| displayVar = ''; |
| } else { |
| displayVar = 'none'; |
| } |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("DistanceLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("DistanceTextBox").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("DistanceTextBox").ClientID %>").disabled = !onOrOff; |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("DistanceRequiredFieldValidator").ClientID %>"), onOrOff); |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("DistanceTextBoxCustomValidator").ClientID %>"), onOrOff); |
| } |
| function SwitchWeightValidators(onOrOff) { |
| var displayVar = ''; |
| if (onOrOff) { |
| displayVar = ''; |
| } else { |
| displayVar = 'none'; |
| } |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("WeightLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("WeightTextBox").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("WeightTextBox").ClientID %>").disabled = !onOrOff; |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("WeightRequiredFieldValidator").ClientID %>"), onOrOff); |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("WeightTextBoxCustomValidator").ClientID %>"), onOrOff); |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("WeightTextBoxRangeValidator").ClientID %>"), onOrOff); |
| } |
| function EnableFreightLoadChargeTypeDropdown(onOrOff) { |
| var displayVar = ''; |
| if (onOrOff) { |
| displayVar = ''; |
| } else { |
| displayVar = 'none'; |
| } |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("FreightLoadChargeTypeLabel").ClientID %>").disabled = !onOrOff; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("FreightLoadChargeTypeDropDownList").ClientID %>").disabled = !onOrOff; |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("FreightLoadChargeTypeRequiredFieldValidator").ClientID %>"), onOrOff); |
| } |
| function DisableFieldsForReadAccess(onOrOff) { |
| var displayVar = ''; |
| if (onOrOff) { |
| displayVar = ''; |
| } else { |
| displayVar = 'none'; |
| } |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("CustomerIdLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("CustomerIdDropDown").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("CustomerIdDropDown").ClientID %>").disabled = !onOrOff; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("LinkFreightLoadChargeLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("LinkFreightLoadChargeDropDown").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("LinkFreightLoadChargeDropDown").ClientID %>").disabled = !onOrOff; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentCheckBoxLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentCheckBox").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentCheckBox").ClientID %>").disabled = !onOrOff; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentNumberLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentNumberDropDownList").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentNumberDropDownList").ClientID %>").disabled = !onOrOff; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ChargeAgreementSegmentLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ChargeAgreementSegmentDropDownList").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ChargeAgreementSegmentDropDownList").ClientID %>").disabled = !onOrOff; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("FreightExtraChargeTypeLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("FreightExtraChargeTypeDropDownList").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("FreightExtraChargeTypeDropDownList").ClientID %>").disabled = !onOrOff; |
| } |
| function UnlockAllocatedFreightAmountForEditAccess(onOrOff) { |
| var display = ''; |
| if (!onOrOff) { |
| display = 'none'; |
| } |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("AllocatedFreightAmountLabel").ClientID %>").style.display = display; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("AllocatedFreightAmountTextBox").ClientID %>").style.display = display; |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("AllocatedFreightAmountTextBoxCustomValidator").ClientID %>"), onOrOff); |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("AllocatedFreightAmountTextBoxRequiredFieldValidator").ClientID %>"), onOrOff); |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("AllocatedFreightAmountTextBoxRangeValidator").ClientID %>"), onOrOff); |
| } |
| function FreightLoadChargeTypeSelected() { |
| var e = $("<%# FreightLoadChargeInsertDataPanel.FindControl("FreightLoadChargeTypeDropDownList").ClientID %>"); |
| var freightLoadChargeValue = e.options[e.selectedIndex].text; |
| switch (freightLoadChargeValue) { |
| case "Unknown": |
| // alert("Unknown"); |
| EnableFreightLoadChargeTypeDropdown(true); |
| DisableFieldsForReadAccess(true); |
| SwitchDistanceValidators(false); |
| SwitchWeightValidators(false); |
| UnlockAllocatedFreightAmountForEditAccess(false); |
| EnableShipmentNumberValidators(false); |
| EnableExtraChargeTypeValidators(false); |
| EnableCostCenterValidators(false); |
| EnableCorporateAdjustmentValues(false); |
| EnableCustomerShipmentAgreementValues(false); |
| EnableFreightMethodDropDown(false); |
| EnableFreightMethodValidator(false); |
| break; |
| case "EFCO Customer": |
| //alert("EFCO Customer"); |
| EnableFreightLoadChargeTypeDropdown(false); |
| DisableFieldsForReadAccess(true); |
| UnlockAllocatedFreightAmountForEditAccess(false); |
| SwitchDistanceValidators(true); |
| SwitchWeightValidators(false); |
| EnableShipmentNumberValidators(false); |
| EnableExtraChargeTypeValidators(false); |
| EnableCostCenterValidators(false); |
| EnableCorporateAdjustmentValues(false); |
| EnableCustomerShipmentAgreementValues(false); |
| EnableFreightMethodDropDown(true); |
| EnableFreightMethodValidator(false); |
| break; |
| case "Inter-Company Shipment": |
| //alert("Inter-Company Shipment"); |
| EnableFreightLoadChargeTypeDropdown(false); |
| DisableFieldsForReadAccess(true); |
| UnlockAllocatedFreightAmountForEditAccess(false); |
| SwitchDistanceValidators(true); |
| SwitchWeightValidators(false); |
| EnableShipmentNumberValidators(false); |
| EnableExtraChargeTypeValidators(false); |
| EnableCostCenterValidators(true); |
| EnableCorporateAdjustmentValues(false); |
| EnableCustomerShipmentAgreementValues(false); |
| EnableFreightMethodDropDown(false); |
| EnableFreightMethodValidator(false); |
| break; |
| case "Mexico Shipment/Return": |
| //alert("Mexico Shipment/Return"); |
| EnableFreightLoadChargeTypeDropdown(false); |
| DisableFieldsForReadAccess(true); |
| UnlockAllocatedFreightAmountForEditAccess(false); |
| SwitchDistanceValidators(true); |
| SwitchWeightValidators(false); |
| EnableShipmentNumberValidators(false); |
| EnableExtraChargeTypeValidators(false); |
| EnableCostCenterValidators(false); |
| EnableCorporateAdjustmentValues(false); |
| EnableCustomerShipmentAgreementValues(false); |
| EnableFreightMethodDropDown(false); |
| EnableFreightMethodValidator(false); |
| break; |
| case "CPI Production": |
| //alert("CPI Production"); |
| EnableFreightLoadChargeTypeDropdown(true); |
| DisableFieldsForReadAccess(false); |
| UnlockAllocatedFreightAmountForEditAccess(false); |
| SwitchDistanceValidators(true); |
| SwitchWeightValidators(true); |
| EnableShipmentNumberValidators(false); |
| EnableExtraChargeTypeValidators(false); |
| EnableCostCenterValidators(false); |
| EnableCorporateAdjustmentValues(false); |
| EnableCustomerShipmentAgreementValues(true); |
| EnableFreightMethodDropDown(false); |
| EnableFreightMethodValidator(false); |
| break; |
| case "Georgetown Production": |
| //alert("Georgetown Production"); |
| EnableFreightLoadChargeTypeDropdown(true); |
| DisableFieldsForReadAccess(false); |
| UnlockAllocatedFreightAmountForEditAccess(false); |
| SwitchDistanceValidators(true); |
| SwitchWeightValidators(true); |
| EnableShipmentNumberValidators(false); |
| EnableExtraChargeTypeValidators(false); |
| EnableCostCenterValidators(false); |
| EnableCorporateAdjustmentValues(false); |
| EnableCustomerShipmentAgreementValues(true); |
| EnableFreightMethodDropDown(false); |
| EnableFreightMethodValidator(false); |
| break; |
| case "Swaploader": |
| //alert("Swaploader"); |
| EnableFreightLoadChargeTypeDropdown(true); |
| DisableFieldsForReadAccess(false); |
| UnlockAllocatedFreightAmountForEditAccess(false); |
| SwitchDistanceValidators(true); |
| SwitchWeightValidators(true); |
| EnableShipmentNumberValidators(false); |
| EnableExtraChargeTypeValidators(false); |
| EnableCostCenterValidators(false); |
| EnableCorporateAdjustmentValues(false); |
| EnableCustomerShipmentAgreementValues(true); |
| EnableFreightMethodDropDown(false); |
| EnableFreightMethodValidator(false); |
| break; |
| case "Extra Charges (billable)": |
| //alert("Extra Charges (billable)"); |
| EnableFreightLoadChargeTypeDropdown(true); |
| DisableFieldsForReadAccess(false); |
| UnlockAllocatedFreightAmountForEditAccess(true); |
| SwitchDistanceValidators(false); |
| SwitchWeightValidators(false); |
| EnableShipmentNumberValidators(true); |
| EnableExtraChargeTypeValidators(true); |
| EnableCostCenterValidators(false); |
| EnableCorporateAdjustmentValues(false); |
| EnableCustomerShipmentAgreementValues(true); |
| EnableFreightMethodDropDown(true); |
| EnableFreightMethodValidator(true); |
| break; |
| case "Extra Charges (non-billable)": |
| //alert("Extra Charges (non-billable)"); |
| EnableFreightLoadChargeTypeDropdown(true); |
| DisableFieldsForReadAccess(false); |
| UnlockAllocatedFreightAmountForEditAccess(true); |
| SwitchDistanceValidators(false); |
| SwitchWeightValidators(false); |
| EnableShipmentNumberValidators(false); |
| EnableExtraChargeTypeValidators(true); |
| EnableCostCenterValidators(true); |
| EnableCorporateAdjustmentValues(false); |
| EnableCustomerShipmentAgreementValues(true); |
| EnableFreightMethodDropDown(false); |
| EnableFreightMethodValidator(false); |
| break; |
| case "Corporate Adjustment": |
| //alert("Corporate Adjustment"); |
| EnableFreightLoadChargeTypeDropdown(true); |
| DisableFieldsForReadAccess(true); |
| UnlockAllocatedFreightAmountForEditAccess(true); |
| SwitchDistanceValidators(false); |
| SwitchWeightValidators(false); |
| EnableShipmentNumberValidators(false); |
| EnableExtraChargeTypeValidators(false); |
| EnableCostCenterValidators(true); |
| EnableCorporateAdjustmentValues(true); |
| EnableCustomerShipmentAgreementValues(false); |
| EnableFreightMethodDropDown(false); |
| EnableFreightMethodValidator(false); |
| break; |
| default: |
| alert("shouldn't be possible, unknown selection in Freight Load Charge Type"); |
| EnableFreightLoadChargeTypeDropdown(false); |
| DisableFieldsForReadAccess(true); |
| SwitchDistanceValidators(false); |
| SwitchWeightValidators(false); |
| UnlockAllocatedFreightAmountForEditAccess(false); |
| EnableShipmentNumberValidators(false); |
| EnableExtraChargeTypeValidators(false); |
| EnableCostCenterValidators(false); |
| EnableCustomerShipmentAgreementValues(false); |
| EnableFreightMethodDropDown(false); |
| EnableFreightMethodValidator(false); |
| } |
| } |
| function ConfirmCarrierInvoiceAllocationAmount() { |
| if(SafeToNumber($get("<%# FreightLoadChargeInsertDataPanel.FindControl("AllocatedFreightAmountTextBox").ClientID %>").value) > 5000) |
| { |
| return confirm("Please verify this large dollar amount."); |
| } |
| } |
| function EnableShipmentNumberValidators(onOrOff) { |
| var displayVar = ''; |
| if (onOrOff) { |
| displayVar = ''; |
| } else { |
| displayVar = 'none'; |
| } |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentNumberLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentNumberDropDownList").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentNumberDropDownList").ClientID %>").disabled = !onOrOff; |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("ShipmentNumberDropDownListRequiredFieldValidator").ClientID %>"), onOrOff); |
| } |
| function EnableExtraChargeTypeValidators(onOrOff) { |
| var displayVar = ''; |
| if (onOrOff) { |
| displayVar = ''; |
| } else { |
| displayVar = 'none'; |
| } |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("FreightExtraChargeTypeLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("FreightExtraChargeTypeDropDownList").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("FreightExtraChargeTypeDropDownList").ClientID %>").disabled = !onOrOff; |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("FreightExtraChargeTypeDropDownListRequiredFieldValidator").ClientID %>"), onOrOff); |
| } |
| function EnableCostCenterValidators(onOrOff) { |
| var displayVar = ''; |
| if (onOrOff) { |
| displayVar = ''; |
| } else { |
| displayVar = 'none'; |
| } |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("CostCenterLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("CostCenterDropDownList").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("CostCenterDropDownList").ClientID %>").disabled = !onOrOff; |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("CostCenterDropDownListRequiredFieldValidator").ClientID %>"), onOrOff); |
| } |
| function EnableCorporateAdjustmentValues(onOrOff) { |
| var displayVar = ''; |
| if (onOrOff) { |
| displayVar = ''; |
| } else { |
| displayVar = 'none'; |
| } |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("LinkFreightLoadChargeLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("LinkFreightLoadChargeDropDown").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("LinkFreightLoadChargeDropDown").ClientID %>").disabled = !onOrOff; |
| } |
| function EnableCustomerShipmentAgreementValues(onOrOff) { |
| var displayVar = ''; |
| if (onOrOff) { |
| displayVar = ''; |
| } else { |
| displayVar = 'none'; |
| } |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("CustomerIdLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("CustomerIdDropDown").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("CustomerIdDropDown").ClientID %>").disabled = !onOrOff; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentCheckBoxLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentCheckBox").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ShipmentCheckBox").ClientID %>").disabled = !onOrOff; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ChargeAgreementSegmentLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ChargeAgreementSegmentDropDownList").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("ChargeAgreementSegmentDropDownList").ClientID %>").disabled = !onOrOff; |
| } |
| function EnableFreightMethodDropDown(onOrOff) { |
| var displayVar = ''; |
| if (onOrOff) { |
| displayVar = ''; |
| } else { |
| displayVar = 'none'; |
| } |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("FreightTypeLabel").ClientID %>").style.display = displayVar; |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("FreightTypeDropDownList").ClientID %>").style.display = displayVar; |
| } |
| function EnableFreightMethodValidator(onOrOff) { |
| $("<%= FreightLoadChargeInsertDataPanel.FindControl("FreightTypeDropDownList").ClientID %>").disabled = !onOrOff; |
| ValidatorEnable($("<%# FreightLoadChargeInsertDataPanel.FindControl("FreightTypeDropDownListRequiredFieldValidator").ClientID %>"), onOrOff); |
| } |
| </script> |
| </telerik:RadScriptBlock> |