How setting the Color Foreground

6 replies. Last post: October 2, 2012 7:59 AM by armore1972
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
armore1972Member

Hi all,

I have a aspx page that calculate the prices of the product with a column NetAmountNetAmount.

I need to color in red this column only in some conditions are true.

I try to insert some code

row.Cells.GetNamedItem("NetAmount").Row.Style.ForeColor = "Red";


row.GetCells().GetNamedItem('NetAmountNetAmount').GetElement().style.color = "Red";


but i have these error when try to set the color

row.Cells.GetNamedItem("NetAmount").GetElement() is NULL

row.Cells.GetNamedItem("NetAmount").Row.Style is NULL


this is the function that i call in the code


function WebGridPrices_OnInitializeRow(controlId, row) {
//userdefined/edit.aspx?id={380C9D74-F738-DF11-B28F-005056B50AB3}&etc=10011#
var orgname = getQuerystring('orgname', '');
if (orgname != '') {
orgname = '/' + orgname;
}

if (row.Cells.GetNamedItem("discountScaleName") != null) {
row.Cells.GetNamedItem("discountScaleName").Value = [window.location.protocol, '//',
window.location.host, orgname, '/userdefined/edit.aspx?id={',
row.Cells.GetNamedItem("discountScaleId").Value, '}&etc=', etc, '#'].join('');
}
else {
if (row.Cells.GetNamedItem("discountScaleName"))
row.Cells.GetNamedItem("discountScaleName").Value = " ";
}
if (row.Cells.GetNamedItem("price"))
row.Cells.GetNamedItem("price").Value = convertNumberWithRightFormat(parseFloat(row.Cells.GetNamedItem("price").Value));

if (row.Cells.GetNamedItem("priceType")) {
var txt = row.Cells.GetNamedItem("priceType").Value;
if (txt.indexOf('rabatt') == -1) {
if (row.Cells.GetNamedItem("NetAmount"))
row.Cells.GetNamedItem("NetAmount").Value = convertNumberWithRightFormat(parseFloat(row.Cells.GetNamedItem("NetAmount").Value));
}
else {
var quantity = row.Cells.GetNamedItem("minQty").Value;
var priceUnit = row.Cells.GetNamedItem("priceUnit").Value;
var discount = row.Cells.GetNamedItem("fixDiscount1").Value;
var price = parseFloat(convertTextToNumber(row.Cells.GetNamedItem("price").Value));
var netAmount = parseFloat((quantity / (priceUnit * 100)) * (100 * price - discount * price));
row.Cells.GetNamedItem("NetAmount").Value = convertNumberWithRightFormat(netAmount);


row.Cells.GetNamedItem("NetAmount").CellStyle.ForeColor = "Red";

}
}
}


The code is


<%@ Page Language="C#" AutoEventWireup="true" EnableSessionState="true" CodeBehind="PriceInfo.aspx.cs"
    Inherits="Wuerth.Phoenix.Speedy.OrderlineGrid.PriceInfo" %>
<%@ Register Assembly="ISNet.WebUI.WebInput" Namespace="ISNet.WebUI.WebControls"
    TagPrefix="ISWebInput" %>
<%@ Register Assembly="ISNet.WebUI.WebCombo" Namespace="ISNet.WebUI.WebCombo" TagPrefix="ISWebCombo" %>
<%@ Register Assembly="ISNet.WebUI.WebGrid" Namespace="ISNet.WebUI.WebGrid" TagPrefix="ISWebGrid" %>
<%@ Register Assembly="ISNet.WebUI.ISDataSource, Version=1.0.1500.1, Culture=neutral, PublicKeyToken=c4184ef0d326354b"
    Namespace="ISNet.WebUI.DataSource" TagPrefix="ISDataSource" %>
<%@ Register Assembly="ISNet.WebUI.WebDesktop" Namespace="ISNet.WebUI.WebDesktop"
    TagPrefix="ISWebDesktop" %>
<%@ Register
    Assembly="AjaxControlToolkit"
    Namespace="AjaxControlToolkit"
    TagPrefix="ajaxToolkit" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html >
<head id="Head1" runat="server">
    <title></title>
    <link href="Styles/IFrame.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript">
        var productListHash = new ActiveXObject("Scripting.Dictionary");
        var firstLoad = true;
        function TextBoxProduct_onkeypress(event) {
            if (event.type == "keypress" && event.srcElement.id == "TextBoxProduct"
                    && event.keyCode == 13) {
                searchPrices_Clicked();
            }
        }
        function TextBoxProduct_onkeydown(event) {
            if (isEditProductCustomized == 'true') {
                if (!(event.ctrlKey && (event.keyCode == 88 || event.keyCode == 67)) && (event.keyCode != 39) && (event.keyCode != 17)) {
                    if (event.type == "keydown" && event.srcElement.id == "TextBoxProduct") {
                        var newTextBoxValue = TextBoxProductFormatProductNumber.formatProductString(event.keyCode);
                        if (newTextBoxValue != null) {
                            event.srcElement.value = newTextBoxValue;
                            if (newTextBoxValue.length == 0) {
                                event.srcElement.select();
                            }
                            event.returnValue = event.keyCode == 13 /*enter*/ || event.keyCode == 9 /*tab*/;
                        }
                    }
                }
            }
        }
        function body_onload(event) {
            var TextBoxProduct = document.getElementById("TextBoxProduct");
            TextBoxProductSelection = new WuerthPhoenix.Utility.Selection(TextBoxProduct);
            TextBoxProductFormatProductNumber = new WuerthPhoenix.Utility.FormatProductNumber(TextBoxProduct, productFormat);
            TextBoxProduct.attachEvent('onkeydown', TextBoxProduct_onkeydown);
            TextBoxProduct.onkeypress = function() { TextBoxProduct_onkeypress(event); };
            TextBoxProduct.focus();
        }
        
        function searchPrices_Clicked() {
            var grid = ISGetObject("WebGridPrices");
            grid.Refresh();
        }
        function PriceInfoItem() {
            this.productNumber = "";
            this.productName = "";
            this.priceIdentifier = "";
            this.priceIdType = "";
            this.priceName = "";
            this.price = "";
            this.minQty = "";
            this.priceType = "";
            this.manualPrice = "";
            this.manualDiscount1 = "";
            this.manualDiscount2 = "";
            this.manualDiscountAmount = "";
            this.fixDiscount1 = "";
            this.fixDiscount2 = "";
            this.fixDiscountAmount = "";
            this.fixCommission = "";
            this.discountScaleType = "";
            this.discountScaleName = "";
            this.priceUnit = "";
            this.priceUnitId = "";
            this.maxDiscount = "";
            this.minDiscount = "";
            this.maxCommission = "";
            this.pricetypeId = "";
            this.discountScaleId = "";
            this.isGeneralManualPrice = "";
            this.hierarchyPriority = "";
            this.priceListPriority = "";
            this.typePriority = "";
            this.prodgroupdes = "";
            this.priority = "";
            this.authrequired = "";
        }
        
        function Service_Selecting(control, selectArguments) {
            var IncomingData = new Object();
            IncomingData.UserID = userId;
            IncomingData.Orgname = getQuerystring("orgname");
            IncomingData.UserLCID = getQuerystring("userlcid");
            IncomingData.AreaID = '00000000-0000-0000-0000-000000000000';
            var currency = ISGetObject("WebComboCurrency");
            var account = ISGetObject("WebComboAccount");
            var comboArea = ISGetObject('WebComboArea');
            IncomingData.CustomerID = '00000000-0000-0000-0000-000000000000';
            if (account.Value != null && account.Value != "") {
                IncomingData.CustomerID = account.Value;
            }
            
            if (accountName != null && accountName != "" && firstLoad) {
                document.getElementById('txtAccountNumber').innerText = accountName;
                firstLoad = false;
            }
            if (comboArea.Value != null && comboArea.Value != "") {
                IncomingData.AreaID = comboArea.Value;
            }
            IncomingData.CurrencyID = '00000000-0000-0000-0000-000000000000';
            if (currency.Value != null && currency.Value != "") {
                IncomingData.CurrencyID = currency.Value;
            }
            var quantity = document.getElementById('TextBoxQuantity');
            IncomingData.MinQty = 100000;
            if (quantity.value != null && quantity.value != '') {
                IncomingData.MinQty = parseInt(quantity.value, 10);
            }
            var TextBoxProduct = document.getElementById('TextBoxProduct')
            IncomingData.Product = TextBoxProduct.value == "*" ? "" : TextBoxProduct.value;
            IncomingData.ApplyProductDist = document.getElementById('HiddenApplyProductDist').value;
            selectArguments.FilterExpression = IncomingData.UserID + "," + IncomingData.AreaID + "," +
                IncomingData.CustomerID + "," + IncomingData.CurrencyID + "," +
                IncomingData.Product + "," + IncomingData.UserLCID + "," + IncomingData.MinQty + "," +
                IncomingData.ApplyProductDist + "," + 500 + "," + getQuerystring("orgname");
            //            LogEvent("Selecting data. Operation Type: " + selectArguments.OperationType + ", FilterExpression=" + selectArguments.FilterExpression +
            //                        ", SortExpression=" + selectArguments.SortExpression);
        }
        function IncomingData() {
            this.__type = "Wuerth.Phoenix.Speedy.OrderlineGrid.IncomingData";
            this.UserID = userId;
            this.Orgname = getQuerystring("orgname");
            this.UserLCID = getQuerystring("userlcid");
            
            this.AreaID = '00000000-0000-0000-0000-000000000000';
            var currency = ISGetObject("WebComboCurrency");
            var account = ISGetObject("WebComboAccount");
            var comboArea = ISGetObject('WebComboArea');
            this.CustomerID = '00000000-0000-0000-0000-000000000000';
            if (account.Value != null && account.Value != "") {
                this.CustomerID = account.Value;
            }
            if (comboArea.Value != null && comboArea.Value != "") {
                this.AreaID = comboArea.Value;
            }
            this.CurrencyID = '00000000-0000-0000-0000-000000000000';
            if (currency.Value != null && currency.Value != "") {
                this.CurrencyID = currency.Value;
            }
            var quantity = document.getElementById('TextBoxQuantity');
            this.MinQty = 100000;
            if (quantity.value != null && quantity.value != '') {
                this.MinQty = parseInt(quantity.value,10);
            }
            var TextBoxProduct = document.getElementById('TextBoxProduct')
            this.Product = TextBoxProduct.value == "*" ? "" : TextBoxProduct.value;
            this.ApplyProductDist = document.getElementById('HiddenApplyProductDist').value;
            
        } //end class
        function WebComboAccount_OnLostFocus() {
            var comboAccount = ISGetObject('WebComboAccount');
            var accountId = document.getElementById('HiddenAccountId');
            if ((comboAccount.Value != accountId.value)||
                ((comboAccount.Value != "") && (comboAccount.GetTextBoxValue() == ""))) {
                if (comboAccount.GetTextBoxValue() == "") {
                    accountId.value = '';
                    var comboArea = ISGetObject('WebComboArea');
                    //comboArea.ClearResultBox();
                    comboArea.ClearSelection();
                    comboArea.NeedClearList = true;
                    comboArea.SetText('');
                    comboArea.LoadValue(true);
                    comboArea.NeedClearList = true;
                    comboArea.SetText(areaName);
                    comboArea.SetValue(areaId);
                    comboArea.LoadValue(true);
                    document.getElementById('txtAccountNumber').innerText = '';
                    document.getElementById('txtFullName').innerText = '';
                    if (!comboArea.IsValueInRange()) {
                        comboArea.SetText('');
                        comboArea.SetValue('00000000-0000-0000-0000-000000000000');
                        
                    }
                }
            }
        }
        function WebComboAccount_OnAfterItemSelected() {
            var comboAccount = ISGetObject('WebComboAccount');
            var accountId = document.getElementById('HiddenAccountId');
            var comboArea = ISGetObject('WebComboArea');
            accountId.value = comboAccount.Value;
            comboArea.ClearResultBox();
            comboArea.ClearSelection();
            comboArea.NeedClearList = true;
            comboArea.SetText('');
            comboArea.LoadValue(true);
            comboArea.NeedClearList = true;
            comboArea.SetText(areaName);
            comboArea.SetValue(areaId);
            comboArea.LoadValue(true);
            
            if (!comboArea.IsValueInRange()) {
                comboArea.SetText('');
                comboArea.SetValue('00000000-0000-0000-0000-000000000000');
            }
            var rowComboAccount = comboAccount.GetSelectedRow();
            document.getElementById('txtAccountNumber').innerText = rowComboAccount.cells[2].innerText;
            document.getElementById('txtFullName').innerText = rowComboAccount.cells[4].innerText;
        }
 
        function getQuerystring(key, default_) {
            if (default_ == null) default_ = "";
            key = key.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
            var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
            var qs = regex.exec(window.location.href);
            if (qs == null)
                return default_;
            else
                return qs[1];
        }
      
        
        function WebGridPrices_OnInitializeRow(controlId, row) {
            //userdefined/edit.aspx?id={380C9D74-F738-DF11-B28F-005056B50AB3}&etc=10011#
            var orgname = getQuerystring('orgname', '');
            if (orgname != '') {
                orgname = '/' + orgname;
            }
            if (row.Cells.GetNamedItem("discountScaleName") != null) {
                row.Cells.GetNamedItem("discountScaleName").Value = [window.location.protocol, '//',
                    window.location.host, orgname, '/userdefined/edit.aspx?id={',
                    row.Cells.GetNamedItem("discountScaleId").Value, '}&etc=', etc, '#'].join('');
            }
            else {
                if (row.Cells.GetNamedItem("discountScaleName"))
                    row.Cells.GetNamedItem("discountScaleName").Value = " ";
            }
            if (row.Cells.GetNamedItem("price"))
                row.Cells.GetNamedItem("price").Value = convertNumberWithRightFormat(parseFloat(row.Cells.GetNamedItem("price").Value));
            if (row.Cells.GetNamedItem("priceType")) {
                var txt = row.Cells.GetNamedItem("priceType").Value;
                if (txt.indexOf('rabatt') == -1) {
                    if (row.Cells.GetNamedItem("NetAmount"))
                        row.Cells.GetNamedItem("NetAmount").Value = convertNumberWithRightFormat(parseFloat(row.Cells.GetNamedItem("NetAmount").Value));
                }
                else {
                    var quantity = row.Cells.GetNamedItem("minQty").Value;
                    var priceUnit = row.Cells.GetNamedItem("priceUnit").Value;
                    var discount = row.Cells.GetNamedItem("fixDiscount1").Value;
                    var price = parseFloat(convertTextToNumber(row.Cells.GetNamedItem("price").Value));
                    var netAmount = parseFloat((quantity / (priceUnit * 100)) * (100 * price - discount * price));
                    row.Cells.GetNamedItem("NetAmount").Value = convertNumberWithRightFormat(netAmount);
                   //  row.Cells.GetNamedItem("NetAmount").CellStyle.ForeColor = "Red";
                   // <CellStyle ForeColor="Red" />
                }
            }
        }
    </script>
</head>
<body style="width:100%; height: 100%; padding: 0 5 0 5;" onload="body_onload(event);">
    <form id="form1" runat="server" style="width:100%; height: 100%;">
    <ajaxToolkit:ToolkitScriptManager ID="somename" runat="server" EnablePartialRendering="true" CombineScripts="true">
        <Scripts> 
            <asp:ScriptReference Path="script/shortcut.js"/>
            <asp:ScriptReference Path="script/numberFormat154.js"/>
            <asp:ScriptReference Path="script/Utility.js"/>
        </Scripts> 
    </ajaxToolkit:ToolkitScriptManager>
    <ISDataSource:ISDataSource ID="ISDataSourceAccountInfo" runat="server" 
        SchemaName="Wuerth.Phoenix.Speedy.OrderlineGrid.PriceInfoDataSet">
        <Tables>
            <ISDataSource:ISDataSourceTable DataObjectTypeName="System.Nullable`1[[System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]" 
                SelectMethod="GetData" TableName="p_GetAccountInfo" 
                TypeName="Wuerth.Phoenix.Speedy.OrderlineGrid.PriceInfoDataSetTableAdapters.p_GetAccountInfoTableAdapter">
                <SelectParameters>
                    <asp:QueryStringParameter Name="userid" QueryStringField="userid" 
                        Type="Object" />
                </SelectParameters>
            </ISDataSource:ISDataSourceTable>
        </Tables>
    </ISDataSource:ISDataSource>
    
    <%-- <ISDataSource:ISDataSource ID="ISDataSourceWebGrid" runat="server" 
        SchemaName="Wuerth.Phoenix.Speedy.OrderlineGrid.PriceInfoDataSet">
         <Tables>
            <ISDataSource:ISDataSourceTable SelectMethod="GetData" 
                TableName="p_GetproductBaseInfo" 
                TypeName="Wuerth.Phoenix.Speedy.OrderlineGrid.PriceInfoDataSetTableAdapters.p_GetproductBaseInfoTableAdapter">
                <SelectParameters>
                    <asp:ControlParameter ControlID="TextBoxProduct" Name="prProductNumberOrName"
                            PropertyName="Text" Type="Object" />  
                    <asp:QueryStringParameter QueryStringField="userlcid" Name="prlanguageID" 
                            Type="String" />
                    <asp:ControlParameter ControlID="HiddenUserID" Name="prUserId" 
                            PropertyName="Value" Type="Object"  />
                    <asp:ControlParameter ControlID="WebComboArea" Name="prAreaId"  DefaultValue="00000000-0000-0000-0000-000000000000"
                            PropertyName="Value" Type="Object" />  
                    <asp:ControlParameter ControlID="HiddenAccountID" Name="prAccountID" 
                            PropertyName="Value" Type="Object" />
                    <asp:ControlParameter ControlID="WebComboCurrency" Name="prCurrencyId"  DefaultValue="00000000-0000-0000-0000-000000000000"
                            PropertyName="Value" Type="Object" />
                    <asp:ControlParameter ControlID="TextBoxQuantity" Name="prMinQty" DefaultValue="100000"
                            PropertyName="Text" Type="Object" />
                    <asp:ControlParameter ControlID="HiddenApplyProductDist" Name="prApplyProductDist" 
                            PropertyName="Value" Type="Object" />
                    <asp:ControlParameter ControlID="HiddenMaxProduct" Name="prMaxProducts"
                            PropertyName="Value" Type="Object" />   
                    <asp:ControlParameter ControlID="HiddenAlwaysAddCondition" Name="prAlwaysAddCondition"
                        PropertyName="Value" Type="Object" /> 
                </SelectParameters>
            </ISDataSource:ISDataSourceTable>
            </Tables>
    </ISDataSource:ISDataSource>--%>
    
    <ISDataSource:ISDataSource ID="ISDataSourceArea" runat="server" 
        SchemaName="Wuerth.Phoenix.Speedy.OrderlineGrid.PriceInfoDataSet">
        <Tables>
            <ISDataSource:ISDataSourceTable SelectMethod="GetData" TableName="p_GetAreas" 
                TypeName="Wuerth.Phoenix.Speedy.OrderlineGrid.PriceInfoDataSetTableAdapters.p_GetAreasTableAdapter">
                <SelectParameters>
                    <asp:ControlParameter ControlID="HiddenUserID" Name="prUserId" 
                        PropertyName="Value" Type="String" />
                </SelectParameters>
            </ISDataSource:ISDataSourceTable>
        </Tables>
    </ISDataSource:ISDataSource>
    
    <ISDataSource:ISDataSource ID="ISDataSourceCurrency" runat="server" 
            SchemaName="Wuerth.Phoenix.Speedy.OrderlineGrid.PriceInfoDataSet" 
            CacheDuration="3600" EnableCaching="Yes">
        <Tables>
            <ISDataSource:ISDataSourceTable SelectMethod="GetData" TableName="CurrencyExt" 
                TypeName="Wuerth.Phoenix.Speedy.OrderlineGrid.PriceInfoDataSetTableAdapters.CurrencyExtTableAdapter">
            </ISDataSource:ISDataSourceTable>
        </Tables>
    </ISDataSource:ISDataSource>
    
    <div id="webgrid" class="webgrid" style="height: 100%; width: 100%; overflow-y: auto;">
        <table style="width:100%; table-layout: fixed;">
        <tr>
            <td width="7%" style="padding: 0px 5px 0px 5px" valign="middle">
                <asp:Label ID="LabelProduct" runat="server" Text="Product"></asp:Label>
            </td>
            <td width="26%" style="padding: 0px 5px 0px 5px" valign="middle">
                <asp:TextBox ID="TextBoxProduct" runat="server" Width="70%" Font-Names="Tahoma" 
                    Font-Size="13px"  
                    style="border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#286a9b; 
                    border-top-width:1px; border-top-color:#5794bf; border-top-style:solid;
                    border-left-width:1px; border-left-color:#5794bf; border-left-style:solid;
                    border-right-width:1px; border-right-color:#286a9b; border-right-style:solid;"></asp:TextBox>
            </td>
            <td width="7%" style="padding: 0px 5px 0px 5px" valign="middle">
                <asp:Label ID="LabelAccount" runat="server" Text="Account" Font-Names="Tahoma"></asp:Label>
            </td>
            <td width="26%" style="padding: 0px 5px 0px 5px" valign="middle">
                <ISWebCombo:WebCombo ID="WebComboAccount" runat="server" UseDefaultStyle="True" 
                    AllowWildCardSearch="True" DataCacheStorage="Session" 
                    DataMember="p_GetAccountInfo" DataSourceID="ISDataSourceAccountInfo" 
                    DataTextField="accountnumber" DataValueField="accountid" Height="20px" 
                    ViewStateStorage="None" Width="30%" AdditionalSearchFields="name">
                    <Columns>
                        <ISWebCombo:WebComboColumn Width="80" BaseFieldName="accountnumber" Name="accountnumber" HeaderText="Number" />
                        <ISWebCombo:WebComboColumn BaseFieldName="accountid" Name="accountid" 
                            DataType="System.Guid" Hidden="True" RenderOnHidden="true"/>
                        <ISWebCombo:WebComboColumn BaseFieldName="name" HeaderText="Name" 
                            Name="name" Width="180" />
                        <ISWebCombo:WebComboColumn BaseFieldName="transactioncurrencyidname" 
                            Hidden="True" Name="transactioncurrencyidname" RenderOnHidden="true"/>
                        <ISWebCombo:WebComboColumn BaseFieldName="FullName" 
                            Hidden="True" Name="FullName" RenderOnHidden="true"/>
                    </Columns>
                    <LayoutSettings RoundCorner="False" ComboMode="MultipleColumns">
                        <ClientSideEvents OnLostFocus="WebComboAccount_OnLostFocus"
                                          OnAfterItemSelected="WebComboAccount_OnAfterItemSelected"/>
                    </LayoutSettings>
                </ISWebCombo:WebCombo>
                <asp:Label ID="txtAccountNumber" Font-Names="Tahoma" style="padding: 0px 5px 0px 5px" valign="middle" runat="server" Font-Bold="true" Width="75%"></asp:Label>
            </td>
            <td width="4%" style="padding: 0px 5px 0px 5px" valign="middle">
                <asp:Label ID="LabelPriceAuth" runat="server" Text="User:" Font-Names="Tahoma"></asp:Label>    
            </td>
            <td width="10%" style="padding: 0px 5px 0px 5px" valign="middle">
                <asp:Label ID="txtFullName" Font-Names="Tahoma" style="padding: 0px 5px 0px 5px" valign="middle" runat="server" Font-Bold="true" Width="45%"></asp:Label>
            </td>
            <td width="5%" style="padding: 0px 5px 0px 5px" valign="middle">
                <asp:Label ID="LabelCurrency" runat="server" Text="Currency" Font-Names="Tahoma"></asp:Label>    
            </td>
            <td width="14%" style="padding: 0px 5px 0px 5px" valign="middle">
                <ISWebCombo:WebCombo ID="WebComboCurrency" runat="server" 
                    UseDefaultStyle="True" DataMember="CurrencyExt" 
                    DataSourceID="ISDataSourceCurrency" DataTextField="CurrencyName" 
                    DataValueField="TransactionCurrencyId" Height="20px" Width="70%" 
                    UseCachedDataOnFirstLoad="True">
                    <LayoutSettings  RoundCorner="False" TextBoxMode="ReadOnly" 
                        AlwaysShowAllRowsOnDropdown="True" AlwaysShowHelpButton="False">
                    </LayoutSettings>
                </ISWebCombo:WebCombo>                                
            </td>
        </tr>
        <tr>
            <td width="7%" valign="middle" style="padding: 0px 5px 0px 5px">
                <asp:Label ID="LabelQuantity" runat="server" Text="Quantity"></asp:Label>
            </td>
            <td width="26%" style="padding: 0px 5px 0px 5px">
                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtenderQuantity"
                        runat="server" TargetControlID="TextBoxQuantity" FilterType="Numbers"   />
                <asp:TextBox ID="TextBoxQuantity" runat="server" Width="70%" Font-Names="Tahoma" 
                    Font-Size="13px"  
                    style="border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#286a9b; 
                    border-top-width:1px; border-top-color:#5794bf; border-top-style:solid;
                    border-left-width:1px; border-left-color:#5794bf; border-left-style:solid;
                    border-right-width:1px; border-right-color:#286a9b; border-right-style:solid;"></asp:TextBox>
            </td>
            <td width="7%" style="padding: 0px 5px 0px 5px" valign="middle">
                <asp:Label ID="LabelArea" runat="server" Text="Area"></asp:Label>
            </td>
            <td width="26%" style="padding: 0px 5px 0px 5px" valign="middle">
                <ISWebCombo:WebCombo ID="WebComboArea" runat="server" UseDefaultStyle="True" 
                        DataSourceID="ISDataSourceArea" Height="20px" Width="70%" 
                        DataMember="p_GetAreas" DataTextField="Speedy_name" 
                        DataValueField="Speedy_areaId" AllowAutoDataCaching="False" 
                        ViewStateStorage="None">
                    <LayoutSettings RoundCorner="False">
                    </LayoutSettings>
                </ISWebCombo:WebCombo>
            </td>
            <td width="7%" style="padding: 0px 5px 0px 5px">
                 </td>
            
            <td colspan="3" width="26%" style="padding: 0px 5px 0px 5px" valign="middle">
                <table cellpadding="0" cellspacing="0">
                    <tr>
                    <td>
                        <ISWebDesktop:WebButton style="border: solid 1 black;" ID="ButtonSearch" runat="server" Height="25px" Text="Search"
                            DisplayMode="Text" Width="80px" OnClientClick="searchPrices_Clicked">
                        </ISWebDesktop:WebButton>
                    </td>
                    <td>
                        <div id="spStatus" style="padding-left: 5; height:20px; vertical-align:middle"></div>
                    </td>
                    </tr>
                </table>
            </td>
            </tr>
        </table>
        <ISWebGrid:WebGrid ID="WebGridPrices" runat="server" Width="100%" 
                           UseDefaultStyle="True" BindingOperationMode="ClientBinding" 
                           DefaultStyleMode="Elegant" StateRestorationLevel="Low" >
            <LayoutSettings  AutoFitColumns="true" AllowColumnMove="Yes" AllowGrouping="Yes" GroupByBoxVisible="True" GroupRowInfoFormatDefault="[caption] : [value] ([count])"
                    AllowContextMenu="True" AllowFilter="Yes" FilterBarVisible="true"
                    AllowSorting="Yes" AlwaysShowHelpButton="False"  
                    HideColumnsWhenGrouped="No" ColumnFooters="Yes"  AllowExport="No"
                    AutoFilterSuggestion="True" ShowColumnAction="True" 
                    ShowRefreshButton="False" AutoHeight="true" PagingMode="VirtualLoad" VirtualPageSize="30">
                <ClientSideEvents OnInitializeRow="WebGridPrices_OnInitializeRow" />
                <TextSettings Language="UseCustom" />
            </LayoutSettings>
            <RootTable Caption="Prices found" >
                <%--<GroupedColumns>
                <ISWebGrid:WebGridGroup ColumnMember="productNumber" GroupInterval="Text" GroupMode="Expanded"
                    SortOrder="Ascending" />
                </GroupedColumns>--%>
                <Columns>
                    <ISWebGrid:WebGridColumn Caption="ProductNumber" DataMember="productNumber" 
                            Name="productNumber" Width="100px" TreatMarkupAsLiteralText="True">
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="ProductName" DataMember="productName"
                            name="productName" Width="150px">
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="speedy_prodgroupdes c" DataMember="speedy_prodgroupdes"
                        Name="prodgroupdes" Width="60px" Visible="true">
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="Priority" DataMember="priority" Visible="false"
                            name="priority" DataType="System.Decimal" Width="50px">
                            <CellStyle HorizontalAlign="Right"></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="PriceType" DataMember="priceType" Name="priceType" 
                            Width="160px">
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="PriceList" DataMember="priceName" Visible="false"
                            Name="priceName" Width="160px" >
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="Aut." DataMember="authrequired" Visible="false"
                            DataType="System.String" Name="authrequired" Width="40px" >
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="Quantity" DataMember="minQty" 
                            DataType="System.Decimal" Name="minQty" Width="50px" DataFormatString="#" >
                        <CellStyle HorizontalAlign="Right"></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="PricePerUnit" DataMember="price" 
                            DataType="System.String" Name="price" Width="50px" DataFormatString="c">
                        <CellStyle HorizontalAlign="Right"></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="Discount 1%" DataMember="fixDiscount1"
                            Name="fixDiscount1" Width="40px">
                        <CellStyle HorizontalAlign="Right"></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="Net Amount" DataMember="NetAmount" 
                            DataType="System.String" Name="NetAmount" Width="40px" DataFormatString="c">
                        <CellStyle HorizontalAlign="Right"></CellStyle>
                        <CellStyle ForeColor="Red" />
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="PriceUnit" DataMember="priceUnit" 
                            DataType="System.Decimal" Name="priceUnit" DataFormatString="#" Width="50px" >
                        <CellStyle HorizontalAlign="Right"></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="DiscountScale" DataMember="discountScaleName" Visible="false"
                            Name="discountScaleName" Width="100px" ColumnType="HyperLink" >
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="minDiscount" DataMember="minDiscount" 
                            Name="minDiscount" Width="60px">
                        <CellStyle HorizontalAlign="Right"></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="maxDiscount" DataMember="maxDiscount"
                            Name="maxDiscount" Width="60px">
                        <CellStyle HorizontalAlign="Right"></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="maxCommission" DataMember="maxCommission" Visible="false"
                            Name="maxCommission" Width="80px">
                        <CellStyle HorizontalAlign="Right"></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="manualPrice" DataMember="manualPrice" Name="manualPrice"
                            Width="0px" ColumnType="CheckBox" ShowInSelectColumns="No" Visible="false">
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="manualDiscount1" DataMember="manualDiscount1" Name="manualDiscount1"
                            Width="0px" ColumnType="CheckBox" ShowInSelectColumns="No" Visible="false">
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="fixDiscount1" ShowInSelectColumns="No" Visible="false"
                            DataMember="fixDiscount1" Name="fixDiscount1" Width="0px">
                        <CellStyle HorizontalAlign="Right" ></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="manualDiscount2" DataMember="manualDiscount2"
                            Name="manualDiscount2" Width="0px" 
                            ColumnType="CheckBox" ShowInSelectColumns="No" Visible="false">
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="fixDiscount2" ShowInSelectColumns="No" Visible="false" DataMember="fixDiscount2"
                            Name="fixDiscount2" Width="0px">
                        <CellStyle HorizontalAlign="Right" ></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="manualDiscountAmount" DataMember="manualDiscountAmount" 
                            Name="manualDiscountAmount" Width="0px" ColumnType="CheckBox" 
                            DataType="System.Boolean" ShowInSelectColumns="No" Visible="false">
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="fixDiscountAmount" DataMember="fixDiscountAmount"
                            Name="fixDiscountAmount" Width="0px" DataFormatString="c" ShowInSelectColumns="No" Visible="false">
                        <CellStyle HorizontalAlign="Right"></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="fixCommission" DataMember="fixCommission" Name="fixCommission"
                            Width="0px" ShowInSelectColumns="No" Visible="false">
                        <CellStyle HorizontalAlign="Right"></CellStyle>
                    </ISWebGrid:WebGridColumn>
                    <ISWebGrid:WebGridColumn Caption="discountScaleId" DataMember="discountScaleId" 
                        DataType="System.Guid" Name="discountScaleId" Width="1px" Visible="false" ShowInSelectColumns="No">
                    </ISWebGrid:WebGridColumn>
                </Columns>
            </RootTable>
            <ClientBindingSettings DataSourceType="WebService" ServiceUrl="PriceSearchWS.asmx">
            <ServiceMethods SelectMethod="getPricesProductInfo" />
            <ServiceEvents Selecting="Service_Selecting" />
            </ClientBindingSettings>
        </ISWebGrid:WebGrid>
    </div>
    <asp:HiddenField ID="HiddenAccountId" Value="" runat="server" />
    <asp:HiddenField ID="HiddenUserID" Value="00000000-0000-0000-0000-000000000000" runat="server" />
    <asp:HiddenField ID="HiddenApplyProductDist" Value="false" runat="server" />
    </form>
</body>
</html>



All times are GMT -5. The time now is 7:49 PM.
Previous Next