User Profile & Activity

Member
Page
of 3
Posted: March 18, 2015 3:27 PM
Thanks for the answer.
  • Is not possible to try with other browser (like firefox and chrome) because the page is part of external site used by CRM 2011 with a Rollup that doesn't allow to use other browser.
  • There's not other pages that use the hierarchical, but the strange think is that in second tab seems working well (the invoices has two tabs, the shows different type of invoices and use the same store procedure for display the child row).
  • I enable debugger but when i try to reproduce the issue the IE is blocking and is not possible to access to the debug mode (f12).
I try to make a video.
This is the aspx code that use ( if you need i give to you also the server side)
Thanks
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceHistory.aspx.cs" Inherits="Wuerth.Phoenix.Speedy.OrderlineGrid.InvoiceHistory" %>

<%@ Register Assembly="ISNet.WebUI.WebInput" Namespace="ISNet.WebUI.WebControls"
TagPrefix="ISWebInput" %>
<%@ Register Assembly="ISNet.WebUI.WebGrid" Namespace="ISNet.WebUI.WebGrid" TagPrefix="ISWebGrid" %>
<%@ Register Assembly="ISNet.WebUI.WebCombo" Namespace="ISNet.WebUI.WebCombo" TagPrefix="ISWebCombo" %>
<%@ Register Assembly="ISNet.WebUI.WebDesktop" Namespace="ISNet.WebUI.WebDesktop"
TagPrefix="ISWebDesktop" %>
<%@ Register Assembly="ISNet.WebUI.ISDataSource, Version=1.0.1500.1, Culture=neutral, PublicKeyToken=c4184ef0d326354b"
Namespace="ISNet.WebUI.DataSource" TagPrefix="ISDataSource" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head id="Head1" runat="server">
<style type="text/css">
html, body {
margin: 0; /* Remove body margin/padding */
padding: 0;
border: none;

background-color:#f6f8fa;
scrollbar-3dlight-color:#A5ACB5;
scrollbar-arrow-color:#3B3B3B;
scrollbar-base-color:#E9EDF1;
scrollbar-darkshadow-color:#A5ACB5;
scrollbar-face-color:#E9EDF1;
scrollbar-highlight-color:#E9EDF1;
scrollbar-shadow-color:#E9EDF1;
scrollbar-track-color:#E3E8ED;
}
</style>
<title>Invoice History</title>
<link href="#]*)");
var qs = regex.exec(window.location.href);
if (qs == null)
return default_;
else
return qs[1];
}

function CollapseGrid(controlId) {

var grid = wgGetGridById(controlId);
for (i = 0; i < grid.TotalLoadedRows; i++) {
var row = grid.RootTable.GetRow(i);
if (row.Table.ChildTables.length > 0) {
if (row.ChildExpanded) {
row.CollapseChildRow();
}
}

}

}

function HideCommission() {
var grid = ISGetObject("WebGrid1");
var col = grid.RootTable.Columns.GetNamedItem("speedy_provisionvalue");
//var col = grid.RootTable.ChildTables[0].Columns.GetNamedItem("speedy_commissionvalue");

var visCol = !col.Visible;
document.getElementById('HiddenFieldShowInvCommission').value = visCol;

grid.AddInput("action", "ShowInvCommission");
grid.SendCustomRequest();
}

function WebGrid1_OnChildRowCollapse(controlId, tblName, rowIndex, rowEl) {
}

function WebGrid2_OnChildRowCollapse(controlId, tblName, rowIndex, rowEl) {
}

function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl) {

var grid1 = ISGetObject("WebGrid1");

var webTab = ISGetObject("WebTabHI");
var webInvoicesHeaderItem = webTab.TabPages.GetNamedItem("Invoices");

if (webInvoicesHeaderItem.IsActiveTab()) {
var invoiceNumber = getTextSelectRowByCell(grid1, "invoicenumber");
var productCode = getTextSelectRowByCell(grid1, "productnumber");
if (invoiceNumber != null) {
var productid = getTextSelectHiddenRowByCell(grid1, "speedy_invoicedate", "productid");
synchProductID = productid;
synchInvoiceDetailID = getTextSelectHiddenRowByCell(grid1, "accountidname", "invoicedetailid");

}
else {
var productid = getTextSelectHiddenRowByCell(grid1, "productnumber", "productid");
synchProductID = productid;
synchInvoiceDetailID = getTextSelectHiddenRowByCell(grid1, "productname", "invoicedetailid");

}
}
return true;
}

function WebGrid2_OnRowSelect(controlId, tblName, rowIndex, rowEl) {

var grid2 = ISGetObject("WebGrid2");
var webTab = ISGetObject("WebTabHI");
var webSoldItem = webTab.TabPages.GetNamedItem("SoldProducts");


if (webSoldItem.IsActiveTab()) {
var invoiceNumber = getTextSelectRowByCell(grid2, "invoicenumber");
var productCode = getTextSelectRowByCell(grid2, "TProductCode");
if (invoiceNumber != null) {
synchInvoiceID = getTextSelectHiddenRowByCell(grid2, "speedy_invoicedate", "invoiceid");
synchInvoiceDetailID = getTextSelectHiddenRowByCell(grid2, "productname", "invoicedetailid");

}
else {
synchInvoiceID = getTextSelectHiddenRowByCell(grid2, "TDescription", "invoiceid");
synchInvoiceDetailID = getTextSelectHiddenRowByCell(grid2, "TFreq", "invoicedetailid");

}
}

return true;
}


function WebGrid3_OnRowSelect(controlId, tblName, rowIndex, rowEl) {

var grid3 = ISGetObject("WebGrid3");
var webTab = ISGetObject("WebTabHI");
var webInvoicesPosItem = webTab.TabPages.GetNamedItem("ProductHistory");

if (webInvoicesPosItem.IsActiveTab()) {

synchInvoiceDetailID = getTextSelectHiddenRowByCell(grid3, "productname", "invoicedetailid");
synchInvoiceID = getTextSelectHiddenRowByCell(grid3, "invoicenumber", "invoiceid");
synchProductID = getTextSelectHiddenRowByCell(grid3, "productnumber", "productid");

}
return true;

}

function loadAllRowsGrid(synchInvoiceDetailID) {
var grid = ISGetObject("WebGrid3");
if (grid.TotalLoadedRows == grid.TotalRows)
return;
if (grid.IsInProgress)
setTimeout(function () { loadAllRowsGrid(synchInvoiceDetailID); }, 40000)
var row = grid.RootTable.GetRowByKeyValue(synchInvoiceDetailID);
if (!row) {
wgLoadMore('WebGrid3');
setTimeout(function () { loadAllRowsGrid(synchInvoiceDetailID); }, 40000)
} else {
row.Select();
}
}

function getRowIndexForHistory(controlId, cellInv, textInv, cellProd, textProd) {

var grid = wgGetGridById(controlId);
var TotalRows = grid.TotalRows;
var index = 0;
while (index < TotalRows) {
var row = grid.RootTable.GetRow(index);
var cells = row.GetCells();
if ((cells.GetNamedItem(cellInv).Text == textInv) && (cells.GetNamedItem(cellProd).Text == textProd))
return index;
index = index + 1;
}
return 0;
}

function getRowIndexByText(controlId, cellName, text) {
var grid = wgGetGridById(controlId);
var TotalRows = grid.TotalRows;
var index = 0;
while (index < TotalRows) {
var row = grid.RootTable.GetRow(index);
var cells = row.GetCells();
if (cells.GetNamedItem(cellName).Text == text)
return index;
index = index + 1;
}
return 0;
}


function findChildRow(controlId, cellNameChild, textChild) {

var grid = wgGetGridById(controlId);
var TotalRows = grid.TotalRows;
var index = 0;
var found = false;
while (index < TotalRows) {
grid.RootTable.GetRow(index).ExpandChildRow(true);
var childRows = grid.RootTable.GetRow(index).GetChildRows();
for (var j = 0; j < childRows.length; j++) {
var text = childRows[j].GetCells().GetNamedItem(cellNameChild).Value;
if (text == textChild) {
grid.RootTable.GetRow(index).Select();
childRows[j].Select();
j = childRows.length;
index = TotalRows;
found = true;
}
}
if (!found) {
grid.RootTable.GetRow(index).CollapseChildRow();
}
index = index + 1;
}

}


function expandChildRowAndSelectByKey(controlId, rowObject, TableName, textKey) {
if (!rowObject.ChildExpanded) {
rowObject.ExpandChildRow(true);
}
var grid = wgGetGridById(controlId);
var gridChild = grid.Tables[TableName];
//gridChild.Refresh();
gridChild.GetRowByKeyValue(textKey).Select();
}

function expandChildRowAndSelectByText(controlId, rowObject, cellName, textChild) {
if (!rowObject.ChildExpanded) {
rowObject.ExpandChildRow(true);
}
var childRows = rowObject.GetChildRows();
for (var j = 0; j < childRows.length; j++) {
var text = childRows[j].GetCells().GetNamedItem(cellName).Value;
if (text == textChild) {
childRows[j].Select();
j = childRows.length;
return true;
}
}
return false;
}




function getTextSelectRowByCell(controlId, cellName) {
var grid = wgGetGridById(controlId);
var selObject = grid.GetSelectedObject();
if (selObject) {
var row = selObject.ToRowObject();
if (row) {
var cells = row.GetCells();
var cellInvoiceNumber = cells.GetNamedItem(cellName);
if (cellInvoiceNumber) {
invoiceNumber = cells.GetNamedItem(cellName).Text;
return invoiceNumber;
}
}
}

return null;
}

function getTextSelectHiddenRowByCell(controlId, SourceCellName, HiddenCellName) {

var grid = wgGetGridById(controlId);
var selObject = grid.GetSelectedObject();
if (selObject) {
var row = selObject.ToRowObject();
if (row) {
var text = row.GetCell(SourceCellName).CellElement.getAttribute(HiddenCellName);
return text;
}
}
return null;
}

function WebGrid1_OnCellDoubleClick(controlId, tblName, rowIndex, cellIndex, cellEl) {

var creditnote = getQuerystring('creditnote');

var grd = ISGetObject(controlId);
var selRow = grd.GetSelectedObject().GetRowObject();

if (selRow.Type == "Record") {
var cells = selRow.GetCells();
var cellProductNumber = cells.GetNamedItem("productnumber");
var productNumber;

if (creditnote != "") {
if (selRow.Table.IsRootTable) {
var invoiceNr = cells.GetNamedItem("invoicenumber").Text;
var invoiceId = selRow.KeyValue;
try {
if (window.opener.CheckInvoiceId(invoiceNr)) {
window.opener.UpdateInvoice(invoiceNr, invoiceId);
}
else alert(msgCreditNotePrefix);
}
catch (err) { }
}
else {
var parentRow = selRow.GetParentRow();
var parentCells = parentRow.GetCells();
var invoiceNr = parentCells.GetNamedItem("invoicenumber").Text;
var invoiceId = parentRow.KeyValue;
try {
if (window.opener.CheckInvoiceId(invoiceNr)) {
window.opener.UpdateInvoice(invoiceNr, invoiceId);
}
else alert(msgCreditNotePrefix);
}
catch (err) { }
}
}
else {
if (cellProductNumber != null) {
var productId = selRow.GetCell('productnumber').CellElement.getAttribute('productid');
productNumber = cells.GetNamedItem("productnumber").Text;
// Now pass the value to the Parent form
if (window.opener != null) {
try {
window.opener.callEvent(productNumber, productId);
}
catch (err) {
//alert(msgPageNotValide);
}
}
}
}
}
return true;
}


function WebGrid2_OnCellDoubleClick(controlId, tblName, rowIndex, cellIndex, cellEl) {

var creditnote = getQuerystring('creditnote');
var grid2 = ISGetObject("WebGrid2");
var grd = ISGetObject(controlId);
var selRow = grd.GetSelectedObject().GetRowObject();
if (selRow.Type == "Record") {
var cells = selRow.GetCells();
var cellProductNumber = cells.GetNamedItem("productnumber");
var cellTProductCode = cells.GetNamedItem("TProductCode");
var productId;
if (creditnote != "") {
if (!selRow.Table.IsRootTable) {
var invoiceNr = cells.GetNamedItem("invoicenumber").Text;
var invoiceId = getTextSelectHiddenRowByCell(grid2, "speedy_invoicedate", "invoiceid");
try {
if (window.opener.CheckInvoiceId(invoiceNr)) {
window.opener.UpdateInvoice(invoiceNr, invoiceId);
}
else alert(msgCreditNotePrefix);
}
catch (err) { }
}

}
else {

var productNumber = null;
// Now pass the value to the Parent form
if (cellProductNumber != null) {
productId = selRow.GetCell('productnumber').CellElement.getAttribute('productid');
productNumber = cellProductNumber.Text;
}
else {
if (cellTProductCode != null) {
productId = productId = selRow.GetCell('TProductCode').CellElement.getAttribute('TProductID');
productNumber = cellTProductCode.Text;
}
}
if ((productNumber != null) && (productId != null)) {
if (window.opener != null) {
try {
window.opener.callEvent(productNumber, productId);
}
catch (err) {
//alert(msgPageNotValide);
}
}
}
}
}
return true;
}

function WebGrid3_OnCellDoubleClick(controlId, tblName, rowIndex, cellIndex, cellEl) {
var creditnote = getQuerystring('creditnote');
var grid3 = ISGetObject("WebGrid3");
var grd = ISGetObject(controlId);
var selRow = grd.GetSelectedObject().GetRowObject();
if (selRow.Type == "Record") {
var cells = selRow.GetCells();

if (creditnote != "") {
var invoiceNr = cells.GetNamedItem("invoicenumber").Text;
var invoiceId = getTextSelectHiddenRowByCell(grid3, "invoicenumber", "invoiceid");
try {
if (window.opener.CheckInvoiceId(invoiceNr)) {
window.opener.UpdateInvoice(invoiceNr, invoiceId);
}
else alert(msgCreditNotePrefix);
}
catch (err) { }
}
else {

var productId = selRow.GetCell('productnumber').CellElement.getAttribute('productid');
var productNumber = cells.GetNamedItem("productnumber").Text;
// Now pass the value to the Parent form
if (window.opener != null) {
try {
window.opener.callEvent(productNumber, productId);
}
catch (err) {
//alert(msgPageNotValide);
}
}
}
}

return true;
}

function refreshPage() {
window.location.reload();
}

</script>
<div>
<table style="width: 100%; height: 10%">
<tr>
<td style="width: 40%; text-align: left"><asp:Label Font-Bold="true" ID="Label1" runat="server" Text="Type"></asp:Label>
</td>

</tr>
</table>
</div>
<ISDataSource:ISDataSource ID="ISInvoiceDS" runat="server"
SchemaName="Wuerth.Phoenix.Speedy.OrderlineGrid.InvoiceHistoryTask.InvoiceHistoryGridDataSet" EnableCaching="No">
<tables>
<ISDataSource:ISDataSourceTable SelectMethod="GetData"
TableName="p_ShowInvoiceHeader"
TypeName="Wuerth.Phoenix.Speedy.OrderlineGrid.InvoiceHistoryTask.InvoiceHistoryGridDataSetTableAdapters.p_ShowInvoiceHeaderTableAdapter">
<SelectParameters>
<asp:QueryStringParameter Name="accountID" QueryStringField="accountid"
Type="Object" />
<asp:QueryStringParameter Name="UserLCID" QueryStringField="UserLCID"
Type="String" />
<asp:QueryStringParameter Name="OrgLCID" QueryStringField="OrgLCID"
Type="String" />
</SelectParameters>
</ISDataSource:ISDataSourceTable>
<ISDataSource:ISDataSourceTable SelectMethod="GetData" TableName="p_ShowInvoiceDetails"
TypeName="Wuerth.Phoenix.Speedy.OrderlineGrid.InvoiceHistoryTask.InvoiceHistoryGridDataSetTableAdapters.p_ShowInvoiceDetailsTableAdapter"
DataObjectTypeName="System.Nullable`1[[System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]">
<SelectParameters>
<asp:QueryStringParameter Name="accountID" QueryStringField="accountid"
Type="Object" />

</SelectParameters>
</ISDataSource:ISDataSourceTable>
</tables>
</ISDataSource:ISDataSource>
<ISDataSource:ISDataSource ID="ISSoldProducts" runat="server"
SchemaName="Wuerth.Phoenix.Speedy.OrderlineGrid.InvoiceHistoryTask.InvoiceHistoryGridDataSet" EnableCaching="No">
<tables>
<ISDataSource:ISDataSourceTable SelectMethod="GetData" TableName="SoldProducts"

TypeName="Wuerth.Phoenix.Speedy.OrderlineGrid.InvoiceHistoryTask.InvoiceHistoryGridDataSetTableAdapters.SoldProductsTableAdapter"
DataObjectTypeName="System.Nullable`1[[System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]">
<SelectParameters>
<asp:QueryStringParameter Name="accountid" QueryStringField="accountid"
Type="Object" />
</SelectParameters>
</ISDataSource:ISDataSourceTable>
<ISDataSource:ISDataSourceTable SelectMethod="GetData"
TableName="p_ShowInvoiceDetails"

TypeName="Wuerth.Phoenix.Speedy.OrderlineGrid.InvoiceHistoryTask.InvoiceHistoryGridDataSetTableAdapters.p_ShowInvoiceDetailsTableAdapter"
DataObjectTypeName="System.Nullable`1[[System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]">
<SelectParameters>
<asp:QueryStringParameter Name="accountID" QueryStringField="accountid"
Type="Object" />
</SelectParameters>
</ISDataSource:ISDataSourceTable>
</tables>
</ISDataSource:ISDataSource>

<asp:HiddenField ID="HiddenFieldShowInvCommission" Value="false" runat="server" />

<table style="width: 100%; height: 90%; overflow:auto;">

<tr>
<td>
<ISWebDesktop:WebTab ID="WebTabHI" runat="server" ActiveTabIndex="1">
<FrameStyle Overflow="Scroll" OverflowY="Scroll" OverflowX="Scroll" Height="100%">
</FrameStyle>
<ContainerStyle Overflow="Auto" OverflowY="Auto" OverflowX="Auto" BackColor="#EAF3FF" Height="100%" Width="100%"
BorderColor="#C5C5C5" BorderStyle="Solid" BorderWidth="1px" > <Padding Top="0px" Left="0px" Right="0px" Bottom="0px"></Padding>
</ContainerStyle>
<RoundCornerSettings TopBorderColor="230, 139, 44" FillerBorderColor="255, 199, 60">
</RoundCornerSettings>
<DisabledStyle ForeColor="Gray" BackColor="#EAF3FF" BorderColor="#C5C5C5" Font-Names="Tahoma"
Font-Size="9pt" >
</DisabledStyle>
<TabPages>
<ISWebDesktop:WebTabItem Name="Invoices" Text="Invoices">
<PageTemplate>

<ISWebGrid:WebGrid ID="WebGrid1" runat="server" DataMember="p_ShowInvoiceHeader" DataSourceID="ISInvoiceDS" OnInitializeLayout="WebGrid1_InitializeLayout" OnInitializeRow="WebGrid1_InitializeRow" OnInitializePostBack="WebGrid1_InitializePostBack"
DefaultStyleMode="Win7" UseDefaultStyle="True" Height="100%" Width="100%">
<LayoutSettings AllowSorting="Yes" Hierarchical="true" AutoHeight="false" RowHeightDefault="-1" AutoFitColumns="true" AllowFilter="Yes" FilterBarVisible="true" PagingMode="VirtualLoad" VirtualPageSize="45">
<ClientSideEvents OnCellDblClick="WebGrid1_OnCellDoubleClick" OnChildRowCollapse="WebGrid1_OnChildRowCollapse"/>
<TextSettings Language="UseCustom" />
</LayoutSettings>
<RootTable Caption="Invoices" DataMember="p_ShowInvoiceHeader" DataKeyField="invoiceid" AllowFilter="Yes" >
<SelectedRowStyle BackColor="LightBlue" />
<ChildTables>
<ISWebGrid:WebGridTable Caption="Invoice Details" DataMember="p_ShowInvoiceDetails" DataKeyField="invoicedetailid" AllowFilter="Yes" AutomaticFilter="true" >
<SelectedRowStyle BackColor="LightBlue" />
<Columns>
<ISWebGrid:WebGridColumn Caption="InvoiceDetailID" DataMember="invoicedetailid" Name="invoicedetailid" Visible="false" Width="0px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="ProductID" DataMember="productid" Name="productid" Visible="false" Width="0px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Pos" DataMember="lineitemnumber" Name="lineitemnumber" Visible="true" Width="30px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Cust.Ord.Ref." DataMember="speedy_customerorderreference" Name="speedy_customerorderreference" Visible="true" Width="60px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Product Number" DataMember="productnumber" HiddenDataMember="productid" Name="productnumber" ColumnType="Custom" TreatMarkupAsLiteralText="true" Visible="true" Width="80px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Product Name" DataMember="productname" HiddenDataMember="invoicedetailid" Name="productname" AllowMultiLine="true" TreatMarkupAsLiteralText="true" Visible="true" Width="130px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Cust.Prod.Ref." DataMember="speedy_custprodreference" Name="speedy_custprodreference" Visible="true" Width="60px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="speedy_prodgroupdes c" InputRequired="false" DataMember="speedy_prodgroupdes" Name="speedy_prodgroupdes" Width="50px" EditType="NoEdit">
</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="Quantity" DataFormatString="#0" DataMember="quantity" Name="quantity" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Type" DataMember="pricetype" Name="pricetype" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="ListName" DataMember="speedy_pricelistname" Name="speedy_pricelistname" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="GrossPrice" DataFormatString="c" DataMember="speedy_grossprice" Name="speedy_grossprice" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Price" DataFormatString="c" DataMember="priceperunit" Name="priceperunit" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn DataFormatString="#" Caption="Unit" DataType="System.Int32" DataMember="priceunit" Name="priceunit" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Disc1.%" DataFormatString="#0" DataMember="speedy_discount1" Name="speedy_discount1" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Disc2.%" DataFormatString="#0" DataMember="speedy_discount2" Name="speedy_discount2" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="DiscAmount" DataFormatString="c" DataMember="speedy_discountamount" Name="speedy_discountamount" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="Provv.%" DataFormatString="#0" DataMember="speedy_commission" Name="speedy_commission" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Provv." DataFormatString="c" DataMember="speedy_commissionvalue" Name="speedy_commissionvalue" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Order Date" DataType="System.DateTime" DataFormatString="d" DataMember="speedy_orderdate" Name="speedy_orderdate" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Ord.ID" DataMember="speedy_orderid" Name="speedy_orderid" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Ord.Pos." DataMember="speedy_orderposid" Name="speedy_orderposid" Visible="true" Width="70px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Total Net Value" DataMember="speedy_totalnetvalue" DataFormatString="c" Name="speedy_totalnetvalue" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Seller Support" DataMember="speedy_support" Name="speedy_support" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="Office" DataMember="speedy_office" Name="speedy_office" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Person" DataMember="speedy_person" Name="speedy_person" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
</Columns>
<SortedColumns>
<ISWebGrid:WebGridGroup ColumnMember="lineitemnumber" SortOrder="Ascending" />
</SortedColumns>
</ISWebGrid:WebGridTable>
</ChildTables>
<Columns>
<ISWebGrid:WebGridColumn Caption="ProductID" DataMember="productid" Name="productid" Visible="false" Width="0px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="InvoiceID" DataMember="invoiceid" Name="invoiceid" Visible="false" Width="0px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="InvoicedetailID" DataMember="invoicedetailid" Name="invoicedetailid" Visible="false" Width="0px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Invoice Number" DataMember="invoicenumber" HiddenDataMember="invoiceid" Name="invoicenumber" ColumnType="Custom" TreatMarkupAsLiteralText="true" Visible="true" Width="150px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Invoice Date" DataMember="speedy_invoicedate" HiddenDataMember="productid" Name="speedy_invoicedate" DataType="System.DateTime" DataFormatString="d" Visible="true" Width="100px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Cust.Ord.Ref." DataMember="speedy_customerorderreference" Name="speedy_customerorderreference" Visible="true" Width="80px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Order ID" DataMember="speedy_orderid" HiddenDataMember="speedy_orderid" Name="speedy_orderid" Visible="true" Width="150px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Payment" DataMember="speedy_paytype" Name="speedy_paytype" Visible="false" Width="100px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="TermsOfPay" DataMember="paymenttermscode" Name="paymenttermscode" Visible="true" Width="150px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Day1" DataMember="speedy_day1" Name="speedy_day1" Visible="false" Width="50px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Day2" DataMember="speedy_day2" Name="speedy_day2" Visible="false" Width="50px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Day3" DataMember="speedy_day3" Name="speedy_day3" Visible="false" Width="50px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Amount" DataFormatString="c" DataMember="totalamount" Name="totalamount" Visible="true" Width="100px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Seller" DataMember="speedy_sellercreate" Name="speedy_sellercreate" Visible="false" Width="80px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Exp.%" DataFormatString="#0.00" DataMember="speedy_expencespercent" Name="speedy_expencespercent" Visible="true" Width="100px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Exp." DataFormatString="c" DataMember="speedy_expencesvalue" Name="speedy_expencesvalue" Visible="true" Width="100px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Provv.%" DataFormatString="#0" DataMember="speedy_provisionpercent" Name="speedy_provisionpercent" Width="100px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Provv." DataFormatString="c" DataMember="speedy_provisionvalue" Name="speedy_provisionvalue" Width="100px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Freight A." DataMember="FreightAmount" Name="FreightAmount" DataFormatString="c" Visible="true" Width="80px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
</Columns>
<SortedColumns>
<ISWebGrid:WebGridGroup ColumnMember="invoicenumber" SortOrder="Descending" />
</SortedColumns>
</RootTable>
</ISWebGrid:WebGrid>
</PageTemplate>
</ISWebDesktop:WebTabItem>
<ISWebDesktop:WebTabItem Name="SoldProducts" Text="Sold Products">
<PageTemplate>

<ISWebGrid:WebGrid ID="WebGrid2" runat="server" DataMember="SoldProducts" OnInitializeLayout="WebGrid2_InitializeLayout" OnInitializeRow="WebGrid2_InitializeRow"
DataSourceID="ISSoldProducts" DefaultStyleMode="Win7" UseDefaultStyle="true" Height="100%" Width="100%" >
<LayoutSettings AllowSorting="Yes" Hierarchical="true" AutoHeight="false" RowHeightDefault="-1" AllowFilter="Yes" FilterBarVisible="true" AutoFitColumns="True" PagingMode="VirtualLoad" VirtualPageSize="45">
<ClientSideEvents OnCellDblClick="WebGrid2_OnCellDoubleClick" OnKeyDown="WebGrid2_OnKeydown" OnRowSelect="WebGrid2_OnRowSelect" OnChildRowCollapse="WebGrid2_OnChildRowCollapse"/>
<TextSettings Language="UseCustom" />
</LayoutSettings>
<RootTable Caption="SoldProducts" DataMember="SoldProducts" DataKeyField="TProductID" AllowFilter="Yes">
<SelectedRowStyle BackColor="LightBlue" />
<ChildTables>
<ISWebGrid:WebGridTable Caption="Invoice Details" DataMember="p_ShowInvoiceDetails" DataKeyField="invoicedetailid" AllowFilter="Yes" AutomaticFilter="true">
<SelectedRowStyle BackColor="LightBlue" />
<Columns>
<ISWebGrid:WebGridColumn Caption="ProductID" DataMember="productid" Name="productid" Visible="false" Width="0px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="InvoiceID" DataMember="invoiceid" Name="invoiceid" Visible="false" Width="0px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Invoice Number" DataMember="invoicenumber" Name="invoicenumber" Visible="true" Width="80px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Invoice Date" DataMember="speedy_invoicedate" HiddenDataMember="invoiceid" Name="speedy_invoicedate" DataType="System.DateTime" DataFormatString="d" Visible="true" Width="80px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Pos" DataMember="lineitemnumber" Name="lineitemnumber" Visible="true" Width="30px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Product Number" DataMember="productnumber" HiddenDataMember="productid" Name="productnumber" ColumnType="Custom" TreatMarkupAsLiteralText="true" Visible="true" Width="100px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Cust.Prod.Ref." DataMember="speedy_custprodreference" Name="speedy_custprodreference" Visible="true" Width="80px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Product Name" DataMember="productname" HiddenDataMember="invoicedetailid" Name="productname" ColumnType="Custom" TreatMarkupAsLiteralText="true" Visible="true" Width="120px">
</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="Quantity" DataFormatString="#0" DataMember="quantity" Name="quantity" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Type" DataMember="pricetype" Name="pricetype" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="ListName" DataMember="speedy_pricelistname" Name="speedy_pricelistname" Visible="true" Width="80px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="GrossPrice" DataFormatString="c" DataMember="speedy_grossprice" Name="speedy_grossprice" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Price" DataFormatString="c" DataMember="priceperunit" Name="priceperunit" Visible="true" Width="80px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn DataFormatString="#" Caption="Unit" DataType="System.Int32" DataMember="priceunit" Name="priceunit" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Disc.1%" DataFormatString="#0" DataMember="speedy_discount1" Name="speedy_discount1" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Disc.2%" DataFormatString="#0" DataMember="speedy_discount2" Name="speedy_discount2" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="DiscAmount" DataFormatString="c" DataMember="speedy_discountamount" Name="speedy_discountamount" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="Provv.%" DataFormatString="#0" DataMember="speedy_commission" Name="speedy_commission" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Provv." DataFormatString="c" DataMember="speedy_commissionvalue" Name="speedy_commissionvalue" Visible="true" Width="50px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Order Date" DataType="System.DateTime" DataFormatString="d" DataMember="speedy_orderdate" Name="speedy_orderdate" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Ord.ID" DataMember="speedy_orderid" Name="speedy_orderid" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Ord.Pos." DataMember="speedy_orderposid" Name="speedy_orderposid" Visible="true" Width="70px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Total Net Value" DataMember="speedy_totalnetvalue" DataFormatString="c" Name="speedy_totalnetvalue" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Seller Support" DataMember="speedy_support" Name="speedy_support" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Office" DataMember="speedy_office" Name="speedy_office" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Person" DataMember="speedy_person" Name="speedy_person" Visible="true" Width="70px">
</ISWebGrid:WebGridColumn>

</Columns>
<SortedColumns>
<ISWebGrid:WebGridGroup ColumnMember="speedy_invoicedate" SortOrder="Descending" />
</SortedColumns>
</ISWebGrid:WebGridTable>
</ChildTables>
<Columns>
<ISWebGrid:WebGridColumn Caption="InvoiceID" DataMember="invoiceid" Name="invoiceid" Visible="false" Width="0px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="InvoiceDetailID" DataMember="invoicedetailid" Name="invoicedetailid" Visible="false" Width="0px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="ProductID" DataMember="TProductID" Name="TProductID" Visible="false" Width="0px">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Product Code" DataMember="TProductCode" HiddenDataMember="TProductID" Name="TProductCode" Width="120px" ColumnType="Custom" TreatMarkupAsLiteralText="true">
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Description" DataMember="TDescription" HiddenDataMember="invoiceid" Name="TDescription" ColumnType="Custom" TreatMarkupAsLiteralText="true" AllowMultiLine="true" Width="250px">
</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="speedy_prodgroupdes c" InputRequired="false" DataMember="speedy_prodgroupdes" Name="speedy_prodgroupdes" Width="100px" EditType="NoEdit">
</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="Freq" DataFormatString="#0" DataMember="TFreq" HiddenDataMember="invoicedetailid" Name="TFreq" ColumnType="Custom" TreatMarkupAsLiteralText="true" Width="90px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="SumQty" DataFormatString="#0" DataMember="TSumQty" Name="TSumQty" Width="100px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="AccTurnover" DataFormatString="c" DataMember="TAccTurnover" Name="TAccTurnover" Width="150px">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="LastOrderDate" DataType="System.DateTime" DataFormatString="d" DataMember="TLastOrderDate" Name="TLastOrderDate" Width="120px">
</ISWebGrid:WebGridColumn>
</Columns>
<SortedColumns>
<ISWebGrid:WebGridGroup ColumnMember="TProductCode" SortOrder="Ascending" />
</SortedColumns>
</RootTable>
</ISWebGrid:WebGrid>
</PageTemplate>
</ISWebDesktop:WebTabItem>
</TabPages>
<TabItemStyle>
<Normal Cursor="Hand" BackColor="#EAF3FF" BorderColor="#C5C5C5" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Tahoma" Font-Size="9pt" Height="100%" Width="100%">
<Padding Top="2px" Left="10px" Right="10px" Bottom="0px"></Padding>
</Normal>
<Over BaseStyle="Normal" BackColor="#EAE3FF" BorderColor="#C5C5C5" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Tahoma" Font-Size="9pt">
</Over>
<Active BaseStyle="Normal" BackColor="#EAF3FF" BorderColor="#C5C5C5" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Tahoma" Font-Size="9pt">
</Active>
</TabItemStyle>
</ISWebDesktop:WebTab>
</td>
</tr>
</table>
<asp:ScriptManager ID="InvoiceHistoryScriptManager" runat="server">
<CompositeScript>
<Scripts>
<asp:ScriptReference Path="../script/shortcut.js"/>
<asp:ScriptReference Path="../script/Utility.js"/>
</Scripts>
</CompositeScript>
</asp:ScriptManager>
</form>
</body>
</html>

Posted: February 14, 2014 3:49 AM
Hi Hans,
i have put the video in your sharing area.
You can see that everytime i enter a char in the combo a HttpRequest was open (with related call procedure of search product) but if i try to insert quickly some chars more HttpRequests are opening and after was closing one by one and i need to wait that are closing all to have a result.
Very thanks
Regards
armore1972


Posted: February 11, 2014 12:31 PM
I try to capture the video with issue that we have. Sorry but only with TeamViewer.
Every time i enter a value a Http Session with Calling procedure was started, but if i enter other values, other sessions are opening, and the other that are open are stopped ( by ther search process still running), this behaviour slowing the system.
This is Team Viewer File that i rename like JPEG to attach. You must remove .JPEG extension to see.

Very Thanks


Posted: February 11, 2014 8:17 AM
Very thanks for your answer, but seems that we use this properties.
We use this properties in this way:
The Webcombo has define the method WebComboProd_InitializeDataSource

<ISWebCombo:WebCombo ID="WebComboProd" runat="server" AdditionalSearchFields="ProductName, Speedy_CustProdRefDescription"

DataTextField="ProductNumber"

DataValueField="ProductId"MinCharsToRequest="2"Height="20px"

UseDefaultStyle="True"OnInitializeRow="WebComboProd_InitializeRow"

Width="550px"Latency="200"

OnInitializeDataSource="WebComboProd_InitializeDataSource"

OnInitializeLayout="WebComboProd_InitializeLayout" AllowWildCardSearch="True"

DropDownRows="7" >

<Columns>

....

In the code C# the WebComboProd_InitializeDataSource is defined


protected void WebComboProd_InitializeDataSource(object sender, ISNet.WebUI.WebCombo.DataSourceEventArgs e)

{

string appleOrderTypeBehaviour = HiddenApplyOrderTypeBehaviour.Value;

if (!HiddenEntityType.Value.Equals("salesorder"))

{

appleOrderTypeBehaviour = "false";

}

if (HiddenCustomizedDataSource.Value == "true")

{

DataSet1TableAdapters.pGetproductreferenceTableAdapter prods = new pGetproductreferenceTableAdapter();

orderId = Request.QueryString["id"];

orgname = Request.QueryString["orgname"];

//Request.QueryString["userId"]);

DataSet ds = newDataSet();

string queryText = "";

if (!e.IsFlyDataRequest)

{

if (WebComboProd.Value != "" && WebComboProd.Value != null && WebComboProd.Value != " ")

{

ds.Tables.Add(prods.GetDataById(Request.QueryString["customerid"], Request.QueryString["userlcid"], Request.QueryString["orglcid"], HiddenApplyProductDist.Value, Request.QueryString["userId"], HiddenEnableProdRef.Value, WebComboProd.Value));

e.DataSource = ds;

}

}

else

{

int rowCount = e.RowCount;

if (e.StartRow != 0)

{

rowCount = e.RowCount / 2;

}

int TopRows = e.StartRow + rowCount;

queryText = e.QueryText.Replace("*", "%");

if (!e.QueryText.Contains("*"))

queryText = queryText + "%";

string connectionString = Wuerth.Phoenix.Speedy.PriceSearchPlugin.Properties.Settings.Default.Speedy_ConnectionString;

using (SqlConnection conn = new SqlConnection(connectionString))

{

conn.Open();

using (SqlCommand storedProcCommand = new SqlCommand("p_GetproductreferenceQueryTxt", conn))

{

storedProcCommand.CommandType = CommandType.StoredProcedure;

storedProcCommand.Parameters.AddWithValue("@accountID", Request.QueryString["customerid"]);

storedProcCommand.Parameters.AddWithValue("@languageID", Request.QueryString["userlcid"]);

storedProcCommand.Parameters.AddWithValue("@languageIDOrg", Request.QueryString["orglcid"]);

storedProcCommand.Parameters.AddWithValue("@applyProductDist", HiddenApplyProductDist.Value);

storedProcCommand.Parameters.AddWithValue("@userID", Request.QueryString["userId"]);

storedProcCommand.Parameters.AddWithValue("@enableProdRef", HiddenEnableProdRef.Value);

storedProcCommand.Parameters.AddWithValue("@queryTxt", queryText);

storedProcCommand.Parameters.AddWithValue("@numRowsToGet", TopRows);

storedProcCommand.Parameters.AddWithValue("@applyBehaviour", appleOrderTypeBehaviour);

storedProcCommand.Parameters.AddWithValue("@orderType", orderType);

SqlDataAdapter adapter = new SqlDataAdapter(storedProcCommand);

adapter.Fill(ds, e.StartRow, rowCount, "pGetproductreference");

e.DataSource = ds;

}

WebComboProd.SkipRowParsing = true;

using (SqlCommand storedProcCommand = new SqlCommand("p_GetproductreferenceQueryTxtCount", conn))

{

storedProcCommand.CommandType = CommandType.StoredProcedure;

storedProcCommand.Parameters.AddWithValue("@accountID", Request.QueryString["customerid"]);

storedProcCommand.Parameters.AddWithValue("@languageID", Request.QueryString["userlcid"]);

storedProcCommand.Parameters.AddWithValue("@languageIDOrg", Request.QueryString["orglcid"]);

storedProcCommand.Parameters.AddWithValue("@applyProductDist", HiddenApplyProductDist.Value);

storedProcCommand.Parameters.AddWithValue("@userID", Request.QueryString["userId"]);

storedProcCommand.Parameters.AddWithValue("@enableProdRef", HiddenEnableProdRef.Value);

storedProcCommand.Parameters.AddWithValue("@queryTxt", queryText);

storedProcCommand.Parameters.AddWithValue("@applyBehaviour", HiddenApplyOrderTypeBehaviour.Value);

storedProcCommand.Parameters.AddWithValue("@orderType", orderType);

WebComboProd.TotalDataSourceRows = int.Parse(storedProcCommand.ExecuteScalar().ToString());

}

conn.Close();

}

}

WebComboProd.AllowAutoQueryHandler = false;

}

else

{

WebComboProd.AllowAutoQueryHandler = true;

WebComboProd.DataSourceID = "ISProductRefDS";

WebComboProd.DataMember = "pGetproductreference";

}

}


At the end of this procedure we calling the AllowAutoQueryHandler to false ( the branch else is not used).
I have debug this code part and the behaviour is that the procedure Very thanks for your answer, but we use this properties.
We use this properties in this way:
The Webcombo has define the method WebComboProd_InitializeDataSource

<ISWebCombo:WebCombo ID="WebComboProd" runat="server" AdditionalSearchFields="ProductName, Speedy_CustProdRefDescription"

DataTextField="ProductNumber"

DataValueField="ProductId"MinCharsToRequest="2"Height="20px"

UseDefaultStyle="True"OnInitializeRow="WebComboProd_InitializeRow"

Width="550px"Latency="200"

OnInitializeDataSource="WebComboProd_InitializeDataSource"

OnInitializeLayout="WebComboProd_InitializeLayout" AllowWildCardSearch="True"

DropDownRows="7" >

<Columns>

....

In the code C# the WebComboProd_InitializeDataSource is defined


protected void WebComboProd_InitializeDataSource(object sender, ISNet.WebUI.WebCombo.DataSourceEventArgs e)

{

string appleOrderTypeBehaviour = HiddenApplyOrderTypeBehaviour.Value;

if (!HiddenEntityType.Value.Equals("salesorder"))

{

appleOrderTypeBehaviour = "false";

}

if (HiddenCustomizedDataSource.Value == "true")

{

DataSet1TableAdapters.pGetproductreferenceTableAdapter prods = new pGetproductreferenceTableAdapter();

orderId = Request.QueryString["id"];

orgname = Request.QueryString["orgname"];

//Request.QueryString["userId"]);

DataSet ds = new DataSet();

string queryText = "";

if (!e.IsFlyDataRequest)

{

if (WebComboProd.Value != "" && WebComboProd.Value != null && WebComboProd.Value != " ")

{

ds.Tables.Add(prods.GetDataById(Request.QueryString["customerid"], Request.QueryString["userlcid"], Request.QueryString["orglcid"], HiddenApplyProductDist.Value, Request.QueryString["userId"], HiddenEnableProdRef.Value, WebComboProd.Value));

e.DataSource = ds;

}

}

else

{

int rowCount = e.RowCount;

if (e.StartRow != 0)

{

rowCount = e.RowCount / 2;

}

int TopRows = e.StartRow + rowCount;

queryText = e.QueryText.Replace("*", "%");

if (!e.QueryText.Contains("*"))

queryText = queryText + "%";

string connectionString = Wuerth.Phoenix.Speedy.PriceSearchPlugin.Properties.Settings.Default.Speedy_ConnectionString;

using (SqlConnection conn = new SqlConnection(connectionString))

{

conn.Open();

using (SqlCommand storedProcCommand = new SqlCommand("p_GetproductreferenceQueryTxt", conn))

{

storedProcCommand.CommandType = CommandType.StoredProcedure;

storedProcCommand.Parameters.AddWithValue("@accountID", Request.QueryString["customerid"]);

storedProcCommand.Parameters.AddWithValue("@languageID", Request.QueryString["userlcid"]);

storedProcCommand.Parameters.AddWithValue("@languageIDOrg", Request.QueryString["orglcid"]);

storedProcCommand.Parameters.AddWithValue("@applyProductDist", HiddenApplyProductDist.Value);

storedProcCommand.Parameters.AddWithValue("@userID", Request.QueryString["userId"]);

storedProcCommand.Parameters.AddWithValue("@enableProdRef", HiddenEnableProdRef.Value);

storedProcCommand.Parameters.AddWithValue("@queryTxt", queryText);

storedProcCommand.Parameters.AddWithValue("@numRowsToGet", TopRows);

storedProcCommand.Parameters.AddWithValue("@applyBehaviour", appleOrderTypeBehaviour);

storedProcCommand.Parameters.AddWithValue("@orderType", orderType);

SqlDataAdapter adapter = new SqlDataAdapter(storedProcCommand);

adapter.Fill(ds, e.StartRow, rowCount, "pGetproductreference");

e.DataSource = ds;

}

WebComboProd.SkipRowParsing = true;

using (SqlCommand storedProcCommand = new SqlCommand("p_GetproductreferenceQueryTxtCount", conn))

{

storedProcCommand.CommandType = CommandType.StoredProcedure;

storedProcCommand.Parameters.AddWithValue("@accountID", Request.QueryString["customerid"]);

storedProcCommand.Parameters.AddWithValue("@languageID", Request.QueryString["userlcid"]);

storedProcCommand.Parameters.AddWithValue("@languageIDOrg", Request.QueryString["orglcid"]);

storedProcCommand.Parameters.AddWithValue("@applyProductDist", HiddenApplyProductDist.Value);

storedProcCommand.Parameters.AddWithValue("@userID", Request.QueryString["userId"]);

storedProcCommand.Parameters.AddWithValue("@enableProdRef", HiddenEnableProdRef.Value);

storedProcCommand.Parameters.AddWithValue("@queryTxt", queryText);

storedProcCommand.Parameters.AddWithValue("@applyBehaviour", HiddenApplyOrderTypeBehaviour.Value);

storedProcCommand.Parameters.AddWithValue("@orderType", orderType);

WebComboProd.TotalDataSourceRows = int.Parse(storedProcCommand.ExecuteScalar().ToString());

}

conn.Close();

}

}

WebComboProd.AllowAutoQueryHandler = false;

}

else

{

WebComboProd.AllowAutoQueryHandler = true;

WebComboProd.DataSourceID = "ISProductRefDS";

WebComboProd.DataMember = "pGetproductreference";

}

}


At the end of this procedure we setting the value of AllowAutoQueryHandler to false ( the branch else is not used).
I have debug this code part and i see that
the procedure
WebComboProd_InitializeDataSource are calling everytime insert a char in the combo.

regards






 
Hi Bernard,
As you can see the AlwaysShowAllRowsOnDropdown property is setting to true.
This a  part of  the code that i use:


the query of datasource:

SELECT Contactid,FullName FROM Contact where speedy_departmentid =@speedy_departmentid order by FullName asc


the datasource:

<isdatasource:isdatasource id="ISContact" runat="server" enablecaching="No"
schemaname="Wuerth.Phoenix.Speedy.OrderlineGrid.DataSet1">
<tables>
<ISDataSource:ISDataSourceTable SelectMethod="GetData"
TableName="FilteredContact"

TypeName="Wuerth.Phoenix.Speedy.OrderlineGrid.DataSet1TableAdapters.FilteredContactTableAdapter">
<SelectParameters>
<asp:QueryStringParameter Name="speedy_departmentid" QueryStringField="speedy_departmentid"
Type="String" />
</SelectParameters>
</ISDataSource:ISDataSourceTable>
</tables>
</isdatasource:isdatasource>


The definition of webcombo:

<ISWebCombo:WebCombo ID="WebComboContact" runat="server" DataMember="FilteredContact"
DataSourceID="ISContact" DataTextField="FullName" DataValueField="Contactid"
Height="20px" UseDefaultStyle="True" Width="200px" >
<FlyPostBackSettings PostControlState="False" PostViewState="False"/>
<LayoutSettings StatusBoxVisible="False" TextBoxMode="Editable"
AlwaysShowAllRowsOnDropdown="True" ResultBoxWindowType="Normal">
</LayoutSettings>
</ISWebCombo:WebCombo>


the column:

<ISWebGrid:WebGridColumn Caption="Contacts" DataMember="speedy_contactid" EditType="WebComboNET"
Name="contactid" Width="150px" WebComboID="WebComboContact">
<ValueList DataMember="FilteredContact" DataSourceID="ISContact" DataTextField="FullName"
DataValueField="Contactid">
</ValueList>
</ISWebGrid:WebGridColumn> 



Thanks


Thanks Bernard,
I try but i cannot resolve it.
I need only to remove the filtering in the ShopDrowBox ( i want to see all the contacts regardless the name that i insert in the Contact text.
Regards

armore1972

Posted: July 15, 2013 5:15 AM
Thanks
It works!!!

Hi Bernards,
Thanks for your help but i have another problem about this:
Now i get the value by this
objectObjectValue = CustomEditorObj.GetBaseEditorElement().value;
but if i try to update this value in the component
objectObjectValue = objectObjectValue.replace(',', '.');
the application show the same the wrong value 3,333.00.
I need to show the correct value (33.33 or 33,33), i suppose che CustomEditor has another Element
that contain the value 3,333.00 for example.

Or another way should be forcing the replace the of the ',' with '.' :

After the customer has enter a discount value with ',' (for example 33,33) he must press tab or enter key the focus go to the Note Cell, i should replace the ',' with '.' before the Cell will be processed by CustomEditor ( in this way is like the user has enter 33.33 instead 33,33).

If is possibile can you help me about this implementation?

thanks in advance

Armore1972


Hi Bernard,
i have installed the update dll but i have this error on WebCombo component.

Method not found: 'Void ISNet.WebUI.ISDesignerBase.SetDirty()'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MissingMethodException: Method not found: 'Void ISNet.WebUI.ISDesignerBase.SetDirty()'.

Source Error:

Line 483:                </tables>
Line 484:        </isdatasource:isdatasource>
Line 485:        <ISWebCombo:WebCombo ID="WebComboProd" runat="server" AdditionalSearchFields="ProductName, Speedy_CustProdRefDescription"
Line 486:            DataSourceID="ISProductRefDS" DataMember="pGetproductreference" DataTextField="ProductNumber"
Line 487:            DataValueField="ProductId" MinCharsToRequest="2" Height="20px" UseDefaultStyle="True"

Source File: c:\Program Files\Microsoft Dynamics CRM\CRMWeb\ISV\Speedy\SpeedyPlusCrmUFX20120511\OrderPositionsGrid.aspx Line: 485

Stack Trace:

[MissingMethodException: Method not found: 'Void ISNet.WebUI.ISDesignerBase.SetDirty()'.]
   ISNet.WebUI.WebCombo.WebCombo.set_Width(Unit value) +0
   ASP.orderpositionsgrid_aspx.__BuildControlWebComboProd() in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\ISV\Speedy\SpeedyPlusCrmUFX20120511\OrderPositionsGrid.aspx:485
   ASP.orderpositionsgrid_aspx.__BuildControlmain() in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\ISV\Speedy\SpeedyPlusCrmUFX20120511\OrderPositionsGrid.aspx:125
   ASP.orderpositionsgrid_aspx.__BuildControlform1() in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\ISV\Speedy\SpeedyPlusCrmUFX20120511\OrderPositionsGrid.aspx:115
   ASP.orderpositionsgrid_aspx.__BuildControlTree(orderpositionsgrid_aspx __ctrl) in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\ISV\Speedy\SpeedyPlusCrmUFX20120511\OrderPositionsGrid.aspx:1
   ASP.orderpositionsgrid_aspx.FrameworkInitialize() in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\isv_speedy_speedypluscrmufx20120511\1a5c456a\4d4ff7c2\App_Web_gb0xf8m-.4.cs:0
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +55
   System.Web.UI.Page.ProcessRequest() +91
   System.Web.UI.Page.ProcessRequest(HttpContext context) +240
   ASP.orderpositionsgrid_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\isv_speedy_speedypluscrmufx20120511\1a5c456a\4d4ff7c2\App_Web_gb0xf8m-.4.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171

Do you have an idea about this issue?
Regards
Armore1972
Hi Bernard,
yes i find it in history and download the new version, now it works!
Thanks
armore1972
All times are GMT -5. The time now is 1:39 AM.
Previous Next