PDA

View Full Version : [CLOSED] Error On Chrome



ebeker
Feb 05, 2015, 6:46 PM
After upgrading to 3.0 there are is a problem on my very main page the problem is page loads all good at first load , after pressing any button on to page(it refreshes the page data) on the second rendiring/refresh/load all controls stop working , buttons are not firing... , panels are not collapsing.
I am sorry for the high amount of the code below.

Below Is Markup code


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

<title></title>
<style>
.mycss {
font-weight: normal;
color: #000000;
letter-spacing: 1pt;
word-spacing: -20pt;
font-size: 12px;
text-align: left;
font-family: Arial;
line-height: 1;
}

.borderer {
border: dotted;
}
</style>

</head>



<script type="text/javascript">
var updateTotal = function (grid, container) {
if (!grid.view.rendered) {
return;
}

var field,
value,
width,
data = { test1: 0, test2: 0, test3: 0 },
c,
cs = grid.headerCt.getVisibleGridColumns();

for (var j = 0, jlen = grid.store.getCount() ; j < jlen; j++) {
var r = grid.store.getAt(j);

for (var i = 0, len = cs.length; i < len; i++) {
c = cs[i];
if (c.dataIndex) {
data[c.dataIndex] += r.get(c.dataIndex);
}
}
}

container.suspendLayout = true;
for (var i = 0; i < cs.length; i++) {
c = cs[i];
value = data[c.dataIndex];

field = container.down('component[name="' + c.dataIndex + '"]');

container.remove(field, false);
container.insert(i, field);
width = c.getWidth();
field.setWidth(width - 1);
field.setValue(c.renderer ? (c.renderer)(value, {}, {}, 0, i, grid.store, grid.view) : value);
}

container.items.each(function (field) {
var column = grid.headerCt.down('component[dataIndex="' + field.name + '"]');
field.setVisible(column.isVisible());
});

container.suspendLayout = false;
container.updateLayout();
};
var onKeyUp = function () {
var me = this,
v = me.getValue(),
field;

if (me.startDateField) {
field = Ext.getCmp(me.startDateField);
field.setMaxValue(v);
me.dateRangeMax = v;
} else if (me.endDateField) {
field = Ext.getCmp(me.endDateField);
field.setMinValue(v);
me.dateRangeMin = v;
}

field.validate();
};

</script>


<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>


<ext:Viewport runat="server" Layout="BorderLayout" >

<Items>
<ext:Panel Height="200" ID="Panel1" Collapsed="true" Collapsible="true"
runat="server" Header="True" Title="$ Amounts in Categories"
Region="South" Layout="FitLayout">


<Items>
<ext:CartesianChart
ID="Chart1"
runat="server"
Shadow="true">

<Store>
<ext:Store ID="Store3"
runat="server"
DataSourceID="dtsCat"
AutoDataBind="true">
<Model>
<ext:Model ID="Model3" runat="server">
<Fields>
<ext:ModelField Name="DATALABEL" />
<ext:ModelField Name="TOTAL" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>



<Axes>
<ext:NumericAxis
Fields="TOTAL">


<Label>
<Renderer Handler="return Ext.util.Format.number(value, '0,0');" />
</Label>

</ext:NumericAxis>

<ext:CategoryAxis Position="Bottom" Fields="DATALABEL">
<Label>
</Label>
</ext:CategoryAxis>
</Axes>

<Series>
<ext:AreaSeries
Highlight="true"
XField="DATALABEL"
YField="TOTAL">
<Label
Display="InsideStart"
Field="TOTAL"
Orientation="Horizontal">
<Renderer Handler="return Ext.util.Format.number(value, '0');" />
</Label>


</ext:AreaSeries>
</Series>
</ext:CartesianChart>

</Items>
<BottomBar>
</BottomBar>

</ext:Panel>

<ext:Panel Collapsed="false" AutoScroll="True" Collapsible="false" ID="pnlEast" Frame="true" Border="true"
runat="server"
Header="true"
HeaderPosition="Top"
TitleAlign="Center"
Width="300"
Region="East"
Title="Today's PAGE"
Layout="FormLayout">

<Items>


<ext:GridPanel runat="server" MaxHeight="400" AutoScroll="true" Scroll="Vertical" Flex="1" ID="gpanelToday" Header="true" Title="Today's Created Orders">
<Store>
<ext:Store runat="server" ID="storeToday" DataSourceID="dtsTODAY">
<Model>
<ext:Model runat="server" ID="modelToday" IDProperty="ORD_HDR_ID">
<Fields>
<ext:ModelField Name="ORD_HDR_ID"></ext:ModelField>
<ext:ModelField Name="PoInit"></ext:ModelField>
<ext:ModelField Name="CURRENT_STATUS"></ext:ModelField>
<ext:ModelField Name="UserName"></ext:ModelField>

</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column runat="server" DataIndex="PoInit" Text="PO #"></ext:Column>
<ext:Column ID="Columdfn9" runat="server" DataIndex="CURRENT_STATUS" Text="Status"></ext:Column>
<ext:Column ID="Column9" runat="server" DataIndex="UserName" Text="Created By">
</ext:Column>
</Columns>
</ColumnModel>

<DirectEvents>

<CellDblClick OnEvent="HandleCommand">

<EventMask Msg="Loading...Please Wait" ShowMask="true" UseMsg="true">
</EventMask>
<ExtraParams>

<ext:Parameter Name="amk" Value="Ext.encode(#{gpanelToday}.getRowsValues({selectedO nly : true}))" Mode="Raw" />

</ExtraParams>

</CellDblClick>

</DirectEvents>
</ext:GridPanel>

<ext:GridPanel Scroll="Vertical" AutoScroll="true" MaxHeight="400" runat="server" Flex="1" ID="GridPanel1" Header="true" Title="Today's Deliveries">
<DirectEvents>
<CellDblClick OnEvent="CellClickedEvent">
<ExtraParams>
<ext:Parameter Name="amk" Value="Ext.encode(#{GridPanel1}.getRowsValues({selectedOn ly : true}))"
Mode="Raw" />
<ext:Parameter Name="PoId" Value="record.data.PoId" Mode="Raw" />
<ext:Parameter Name="WebLink" Value="record.data.WebLink" Mode="Raw" />
</ExtraParams>
</CellDblClick>
</DirectEvents>
<Store>
<ext:Store runat="server" ID="store2" DataSourceID="dtsTodaysDel">
<Model>
<ext:Model runat="server" ID="model4" IDProperty="PoId">
<Fields>
<ext:ModelField Name="PoId"></ext:ModelField>
<ext:ModelField Name="Via"></ext:ModelField>
<ext:ModelField Name="PRT_VENDOR_NAME"></ext:ModelField>
<ext:ModelField Name="WebLink"></ext:ModelField>
<ext:ModelField Name="PoInit"></ext:ModelField>

</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="Column11" runat="server" DataIndex="PRT_VENDOR_NAME" Text="Vendor"></ext:Column>
<ext:Column ID="Column12" runat="server" DataIndex="PoInit" Text="Po #"></ext:Column>
<ext:Column ID="Column13" runat="server" DataIndex="Via" Text="Via">
</ext:Column>
</Columns>
</ColumnModel>
</ext:GridPanel>


<ext:GridPanel Scroll="Both" AutoScroll="true" MaxHeight="400" Width="600" runat="server" Flex="1" ID="GridPanel3" Header="true" Title="YTD Pending Orders">
<DirectEvents>

<CellDblClick OnEvent="YTDCellClickedEvent">

<EventMask Msg="Loading...Please Wait" ShowMask="true" UseMsg="true">
</EventMask>
<ExtraParams>

<ext:Parameter Name="PoId" Value="record.data.PoInit" Mode="Raw" />

</ExtraParams>

</CellDblClick>

</DirectEvents>
<Store>
<ext:Store runat="server" ID="storeYTDPending" DataSourceID="dtsYtdWaitingOrders">
<Model>
<ext:Model runat="server" ID="model8" IDProperty="PoInit">
<Fields>
<ext:ModelField Name="LCT_NAME"></ext:ModelField>
<ext:ModelField Name="PoInit"></ext:ModelField>
<ext:ModelField Name="ORDER_CREATE_TIME"></ext:ModelField>
<ext:ModelField Name="ORD_DESC"></ext:ModelField>
<ext:ModelField Name="OrdFallowerUserName"></ext:ModelField>

</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:TemplateColumn ID="TemplateColumn1" runat="server">
<Tpl ID="Tpl1" runat="server">
<Html>
{ORDER_CREATE_TIME:time}
</Html>
</Tpl>
</ext:TemplateColumn>
<ext:Column ID="Column20" runat="server" Flex="1" Hidden="true" DataIndex="LCT_NAME" Text="Lct"></ext:Column>
<ext:Column ID="Column21" runat="server" Flex="1" DataIndex="PoInit" Text="Po #"></ext:Column>
<ext:Column ID="Column23" runat="server" Flex="1" DataIndex="OrdFallowerUserName" Text="Buyer"></ext:Column>
<ext:Column ID="Column22" runat="server" Flex="3" DataIndex="ORD_DESC" Text="Desc"></ext:Column>

</Columns>
</ColumnModel>
</ext:GridPanel>


</Items>
</ext:Panel>
<ext:Panel runat="server" BodyPadding="5" AutoScroll="true" ID="pnlCenter" TitleAlign="Center" TitleCollapse="true" Title="Budget Report / Order Status" Header="true" Region="Center" Layout="FormLayout">
<TopBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>

<ext:ComboBox ForceSelection="true" QueryMode="Local" ID="cmbLocation" DisplayField="LCT_NAME" ValueField="LCT_ID" FieldLabel="Location" LabelAlign="left" EmptyText="Select Location" runat="server">
<Store>
<ext:Store runat="server" ID="storeLCT" DataSourceID="dtsLocations">
<Model>
<ext:Model runat="server" ID="modelLCT" IDProperty="LCT_ID">
<Fields>
<ext:ModelField Name="LCT_ID"></ext:ModelField>
<ext:ModelField Name="LCT_NAME"></ext:ModelField>
</Fields>
</ext:Model>
</Model>

</ext:Store>
</Store>
</ext:ComboBox>
<ext:DateField
ID="DateField1"
runat="server"
Vtype="daterange"
MinText="Date can not be earlier than 01/01/2014"
MinDate="01/01/2014"
FieldLabel="Date Range"
LabelAlign="Right"
EmptyText="Start Date"
EnableKeyEvents="true">
<CustomConfig>
<ext:ConfigItem Name="endDateField" Value="DateField2" Mode="Value" />
</CustomConfig>

</ext:DateField>



<ext:DateField
ID="DateField2"
runat="server"
Vtype="daterange"
EmptyText="End Date"
EnableKeyEvents="true">
<CustomConfig>
<ext:ConfigItem Name="startDateField" Value="DateField1" Mode="Value" />
</CustomConfig>

</ext:DateField>



<ext:Button runat="server" ID="btnRub" Text="Run" Icon="ColorWheel">
<DirectEvents>
<Click OnEvent="RunReport">
<EventMask ShowMask="true"></EventMask>
</Click>
</DirectEvents>

</ext:Button>

<ext:Button runat="server" ID="Button1" Icon="PreviousGreen" ToolTip="Previous Month">
<DirectEvents>
<Click OnEvent="prevmonth">
<EventMask ShowMask="true"></EventMask>
</Click>
</DirectEvents>
</ext:Button>

<ext:Button runat="server" ID="Button2" Icon="NextGreen" ToolTip="Next Month">
<DirectEvents>
<Click OnEvent="nextmonth">
<EventMask ShowMask="true"></EventMask>
</Click>
</DirectEvents>
</ext:Button>

<ext:Button runat="server" ID="Button3" ToolTip="YTD" Icon="ForwardGreen">
<DirectEvents>
<Click OnEvent="YTD">
<EventMask ShowMask="true"></EventMask>
</Click>
</DirectEvents>

</ext:Button>





<ext:ToolbarFill ID="ToolbarFill2" runat="server"></ext:ToolbarFill>
<ext:ToolbarFill ID="ToolbarFill1" runat="server"></ext:ToolbarFill>

<ext:Button runat="server" Icon="ArrowRefresh" ID="btnRefresh" Text="Refresh Dashboard">
<Listeners>
<Click Handler="window.location.reload();"></Click>

</Listeners>

</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<Items>

<ext:FieldSet Height="300" Border="True" Title="Purpose Of Orders" ID="FieldSet1" Layout="HBoxLayout" runat="server">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch"></ext:HBoxLayoutConfig>
</LayoutConfig>
<Items>

<ext:CartesianChart ID="Chart2" Flex="2" runat="server"
StyleSpec="background:#fff;"
Shadow="true"
FlipXY="true"
Animate="true">
<LegendConfig Dock="Right" runat="server" />

<Store>
<ext:Store ID="Store4"
runat="server"
DataSourceID="dtsPOO"
AutoDataBind="true">
<Model>
<ext:Model ID="Model7" runat="server">
<Fields>
<ext:ModelField Name="POO" />
<ext:ModelField Name="Spent" />
<ext:ModelField Name="Budget" />

</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Axes>
<ext:NumericAxis
Position="Bottom"
Fields="Spent,Budget"
Grid="true"
Minimum="0">
<Label>
<Renderer Fn="Ext.util.Format.numberRenderer('0,0')" />
</Label>
</ext:NumericAxis>

<ext:CategoryAxis
Fields="POO"
Position="Left"
Title="PURPOSE OF ORDERS" />
</Axes>
<Series>
<ext:BarSeries
XField="POO"
YField="Spent,Budget">
<Label Display="InsideEnd" Field="Spent,Budget"></Label>
</ext:BarSeries>

</Series>
</ext:CartesianChart>



</Items>

</ext:FieldSet>

<ext:FieldSet Height="200" Border="True" Title="Order Statuses" runat="server" Layout="HBoxLayout">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch"></ext:HBoxLayoutConfig>
</LayoutConfig>
<Items>
<ext:PolarChart
ID="chartStatus"
runat="server"
Animate="true"
Shadow="true"
Flex="2"
InsetPadding="10">

<Store>
<ext:Store ID="storeStatus"
runat="server"
DataSourceID="dtsStatus"
AutoDataBind="true">
<Model>
<ext:Model ID="Model2" runat="server">
<Fields>
<ext:ModelField Name="STATUES" />
<ext:ModelField Name="TOTAL" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Series>
<ext:PieSeries
XField="TOTAL"
ShowInLegend="true"
Donut="0"
Highlight="true"
HighlightMargin="10">
<Label Field="STATUES" FontSize="8px" Display="Inside" />

</ext:PieSeries>
</Series>
</ext:PolarChart>
<ext:GridPanel runat="server" ID="gpanelOrders" Flex="5" Layout="FitLayout">
<Store>
<ext:Store runat="server" ID="storeOrders" DataSourceID="dtsOrders" GroupField="CURRENT_STATUS">
<Model>
<ext:Model runat="server" ID="modelOrders" IDProperty="Ord_Hdr_Id">
<Fields>
<ext:ModelField Name="ORD_HDR_ID"></ext:ModelField>
<ext:ModelField Name="ORD_HDR_NAME"></ext:ModelField>
<ext:ModelField Name="ORD_HDR_DESC"></ext:ModelField>
<ext:ModelField Name="CURRENT_STATUS"></ext:ModelField>
<ext:ModelField Name="ORDER_CREATE_TIME" Type="Date"></ext:ModelField>
<ext:ModelField Name="PoInit"></ext:ModelField>
<ext:ModelField Name="OrderedItems"></ext:ModelField>
<ext:ModelField Name="UserName"></ext:ModelField>
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:TemplateColumn runat="server">
<Tpl runat="server">
<Html>
{ORDER_CREATE_TIME:time}
</Html>
</Tpl>
</ext:TemplateColumn>
<ext:DateColumn ID="Column6" DataIndex="ORDER_CREATE_TIME" Flex="1" Text="MR Created On" runat="server"></ext:DateColumn>
<ext:Column DataIndex="PoInit" Flex="1" Text="PO #" runat="server"></ext:Column>
<ext:Column ID="Column3" DataIndex="ORD_HDR_NAME" Flex="2" Text="Requester" runat="server"></ext:Column>
<ext:Column ID="Column4" DataIndex="ORD_HDR_DESC" Flex="3" Text="Desc" runat="server"></ext:Column>
<ext:Column ID="Column5" DataIndex="CURRENT_STATUS" Flex="1" Text="Status" runat="server"></ext:Column>

<ext:Column ID="Column7" DataIndex="UserName" Flex="1" Text="Created By" runat="server"></ext:Column>
</Columns>

</ColumnModel>
<Features>
<ext:Grouping ID="Grouping2" runat="server" HideGroupedHeader="False" StartCollapsed="true"
GroupHeaderTplString='{columnName}: {name} ( {rows.length} {[values.rows.length > 1 ? "" : ""]})' />
</Features>

<DirectEvents>

<CellDblClick OnEvent="HandleCommand">

<EventMask Msg="Loading...Please Wait" ShowMask="true" UseMsg="true">
</EventMask>
<ExtraParams>

<ext:Parameter Name="amk" Value="Ext.encode(#{gpanelOrders}.getRowsValues({selected Only : true}))" Mode="Raw" />

</ExtraParams>

</CellDblClick>

</DirectEvents>
<SelectionModel>
<ext:RowSelectionModel Enabled="true" AllowDeselect="true" Mode="Multi" runat="server"></ext:RowSelectionModel>
</SelectionModel>

</ext:GridPanel>

</Items>
</ext:FieldSet>


<ext:FieldSet Height="200" Border="True" Title="Budget Report" ID="AdMCIK" Layout="HBoxLayout" runat="server">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch"></ext:HBoxLayoutConfig>
</LayoutConfig>
<Items>

<ext:PolarChart
ID="budgetChart"
runat="server"
StyleSpec="background:#fff;"
InsetPadding="30"
Hidden="false"
Shadow="true"
Flex="2"
Animation="true">

<Store>
<ext:Store ID="Store1"
runat="server"
DataSourceID="dtsBudget"
AutoDataBind="true">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="LCT" />
<ext:ModelField Name="TOTAL" />
<ext:ModelField Name="LIMIT" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Axes>

<ext:NumericAxis Position="Gauge" MajorTickSteps="4" AxisID="myax" Title="Total Spent" Margin="-10">
</ext:NumericAxis>

</Axes>
<Series>
<ext:GaugeSeries Needle="true" ShowInLegend="true" Field="TOTAL" Donut="30">
<Label Field="Total" Display="Inside"></Label>
</ext:GaugeSeries>

</Series>

</ext:PolarChart>

<ext:GridPanel runat="server" Flex="5" ID="gpanelPOS">
<DirectEvents>
<CellDblClick OnEvent="CellClickedEvent">
<ExtraParams>
<ext:Parameter Name="amk" Value="Ext.encode(#{gpanelPOS}.getRowsValues({selectedOnl y : true}))"
Mode="Raw" />
<ext:Parameter Name="PoId" Value="record.data.PoId" Mode="Raw" />
<ext:Parameter Name="WebLink" Value="record.data.WebLink" Mode="Raw" />
</ExtraParams>
</CellDblClick>
</DirectEvents>

<Store>

<ext:Store runat="server" ID="storeShipments" DataSourceID="dtsPOS">
<Sorters>
<ext:DataSorter Direction="DESC"></ext:DataSorter>

</Sorters>
<Model>

<ext:Model runat="server" ID="modelShipment" IDProperty="PoId">

<Fields>

<ext:ModelField Name="PoId" Type="Int"></ext:ModelField>
<ext:ModelField Name="Delivery Date" Type="String"></ext:ModelField>
<ext:ModelField Name="PRT_VENDOR_NAME" Type="String"></ext:ModelField>
<ext:ModelField Name="PoInit" Type="String"></ext:ModelField>
<ext:ModelField Name="Via" Type="String"></ext:ModelField>
<ext:ModelField Name="Comments" Type="String"></ext:ModelField>
<ext:ModelField Name="ORD_HDR_NAME" Type="String"></ext:ModelField>
<ext:ModelField Name="ORD_HDR_DESC" Type="String"></ext:ModelField>
<ext:ModelField Name="OrderCreateUserName" Type="String"></ext:ModelField>
<ext:ModelField Name="BUYER" Type="String"></ext:ModelField>
<ext:ModelField Name="Ship To" Type="String"></ext:ModelField>
<ext:ModelField Name="WebLink" Type="String"></ext:ModelField>
<ext:ModelField Name="AMOUNT"></ext:ModelField>
<ext:ModelField Name="CreateDateTime" Type="Date"></ext:ModelField>



</Fields>

</ext:Model>

</Model>


</ext:Store>
</Store>

<ColumnModel ID="ColumnModel1" runat="server">

<Columns>

<ext:TemplateColumn Text="" Flex="1" runat="server">
<Tpl runat="server">
<Html>
{CreateDateTime:time}

</Html>

</Tpl>
</ext:TemplateColumn>
<ext:DateColumn Format="MM/dd/yyyy" runat="server" Flex="2" ID="Column19" DataIndex="CreateDateTime" Text="PO Created On"></ext:DateColumn>

<ext:Column runat="server" Flex="2" ID="Column8" DataIndex="PoInit" Text="PO"></ext:Column>
<ext:Column runat="server" Align="Right" ID="Column16" Flex="1" DataIndex="AMOUNT" Text="Total $">
<Renderer Format="UsMoney"></Renderer>
</ext:Column>
<ext:Column runat="server" Flex="2" ID="c121" DataIndex="OrderCreateUserName" Text="Ordered By"></ext:Column>
<ext:Column runat="server" Flex="3" ID="Column10" DataIndex="PRT_VENDOR_NAME" Text="Vendor"></ext:Column>
<ext:Column runat="server" Flex="2" ID="Column14" DataIndex="BUYER" Text="Buyer"></ext:Column>





</Columns>

</ColumnModel>
<Features>

<ext:Grouping ID="Grouping1" runat="server" HideGroupedHeader="False" StartCollapsed="false"
GroupHeaderTplString='{columnName}: {name} ( {rows.length} {[values.rows.length > 1 ? "" : ""]})' />

</Features>


</ext:GridPanel>


</Items>

</ext:FieldSet>




</Items>
<BottomBar>
<ext:StatusBar runat="server">
<Items>
<ext:Label runat="server" ID="lblDescription"></ext:Label>
<ext:ToolbarFill runat="server"></ext:ToolbarFill>
<ext:TextField runat="server" ID="txtbudget1" FieldStyle="text-align: right;" Note="Budget" ReadOnly="true" Text=""></ext:TextField>
<ext:TextField runat="server" ID="txtSpent1" FieldStyle="text-align: right;" Note="spent" ReadOnly="true" Text=""></ext:TextField>
<ext:TextField runat="server" ID="txtRemaining1" FieldStyle="text-align: right;" Note="Remaining" ReadOnly="true" Text=""></ext:TextField>
</Items>
</ext:StatusBar>
</BottomBar>
</ext:Panel>

<ext:TabPanel ID="westpanelk" Collapsed="true" Collapsible="true" TitleAlign="Center" Title="Summary" Layout="FitLayout" runat="server" Region="West" Width="375">
<Items>
<ext:GridPanel runat="server" ID="gpanelW" Title="Items">
<Store>
<ext:Store runat="server" ID="storeItems" DataSourceID="dtsItem">
<Model>
<ext:Model runat="server" ID="midel" IDProperty="PRT_ID">
<Fields>
<ext:ModelField Name="PRT_ID"></ext:ModelField>
<ext:ModelField Name="TOTAL" Type="Float"></ext:ModelField>
<ext:ModelField Name="CATEG"></ext:ModelField>
<ext:ModelField Name="PRT_NAME"></ext:ModelField>

</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>


<ext:RowNumbererColumn runat="server" Text="#"></ext:RowNumbererColumn>
<ext:Column runat="server" Text="Category" DataIndex="CATEG" Flex="1">
</ext:Column>
<ext:Column ID="Column1" runat="server" Text="Item" DataIndex="PRT_NAME" Flex="3">
</ext:Column>
<ext:Column runat="server" Text="Cost" Align="Right" DataIndex="TOTAL" Flex="1">


<Renderer Format="UsMoney"></Renderer>
</ext:Column>

</Columns>
</ColumnModel>

<DirectEvents>
<CellDblClick OnEvent="dblclickRow">
<EventMask ShowMask="true">
</EventMask>

</CellDblClick>

</DirectEvents>




<SelectionModel>
<%--<ext:CheckboxSelectionModel RowSpan="1" ID="RowSelectionModel1" Mode="Multi" />--%>


<ext:RowSelectionModel ID="hrty" Mode="Single" runat="server" />
</SelectionModel>

</ext:GridPanel>
<ext:GridPanel runat="server" ID="byCategory" Title="Categories">
<Store>
<ext:Store runat="server" ID="storeTotalsCat" DataSourceID="dtsCatGrid1">
<Model>
<ext:Model runat="server" ID="Model5" IDProperty="ID">
<Fields>
<ext:ModelField Name="CAT"></ext:ModelField>
<ext:ModelField Name="TOTAL" Type="Float"></ext:ModelField>


</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>


<ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" Text="#"></ext:RowNumbererColumn>
<ext:Column ID="Column2" runat="server" Text="Category" DataIndex="CAT" Flex="3">
</ext:Column>

<ext:Column ID="Column17" runat="server" Text="Cost" Align="Right" DataIndex="TOTAL" Flex="1">


<Renderer Format="UsMoney"></Renderer>
</ext:Column>

</Columns>
</ColumnModel>

<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" Mode="Single" runat="server" />
</SelectionModel>

</ext:GridPanel>


<ext:GridPanel runat="server" ID="GridPanel2" Title="Vendor">
<Store>
<ext:Store runat="server" ID="storeVEN" DataSourceID="dtsVENDOR">
<Model>
<ext:Model runat="server" ID="Model6" IDProperty="ID">
<Fields>
<ext:ModelField Name="VEN"></ext:ModelField>
<ext:ModelField Name="TOTAL" Type="Float"></ext:ModelField>


</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>


<ext:RowNumbererColumn ID="RowNumbererColumn2" runat="server" Text="#"></ext:RowNumbererColumn>
<ext:Column ID="Column15" runat="server" Text="Vendor" DataIndex="VEN" Flex="3">
</ext:Column>

<ext:Column ID="Column18" runat="server" Text="Cost" Align="Right" DataIndex="TOTAL" Flex="1">


<Renderer Format="UsMoney"></Renderer>
</ext:Column>

</Columns>
</ColumnModel>

<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel2" Mode="Single" runat="server" />
</SelectionModel>

</ext:GridPanel>

</Items>
<BottomBar>
<ext:Toolbar Layout="HBoxLayout" runat="server">
<Items>

<ext:DisplayField Flex="1" ID="txtTotalSpent" runat="server" Note="Total Spent" ReadOnly="true"></ext:DisplayField>
<ext:DisplayField Flex="1" ID="txtBudget" runat="server" Note="Budget" ReadOnly="true"></ext:DisplayField>
<ext:DisplayField Flex="1" ID="txtRemaining" runat="server" Note="Remaining" ReadOnly="true"></ext:DisplayField>
</Items>
</ext:Toolbar>
</BottomBar>
</ext:TabPanel>


</Items>


</ext:Viewport>
<asp:SqlDataSource ID="dtsBudget" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="ezman.SP_REPORT_LCT_ORDER_TOTALS" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DbType="Date" DefaultValue="01/01/2014" Name="START_DATE" />
<asp:Parameter DbType="Date" DefaultValue="01/02/2014" Name="END_DATE" />
<asp:Parameter DefaultValue="0" Name="LCT_ID" Type="Int32" />
<asp:Parameter DefaultValue="0" Name="CompanyId" Type="Int32" />
<asp:Parameter Name="USER_ID" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="dtsCat" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="ezman.SP_REPORT_LCT_ORDER_TOTALS_CAT" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DbType="Date" DefaultValue="01/01/2014" Name="START_DATE" />
<asp:Parameter DbType="Date" DefaultValue="01/02/2014" Name="END_DATE" />
<asp:Parameter DefaultValue="0" Name="LCT_ID" Type="Int32" />
<asp:Parameter Name="USER_ID" />
<asp:Parameter DefaultValue="0" Name="CompanyId" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>

<asp:SqlDataSource ID="dtsCatGrid1" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="ezman.SP_REPORT_LCT_ORDER_TOTALS_CAT" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DbType="Date" DefaultValue="01/01/2014" Name="START_DATE" />
<asp:Parameter DbType="Date" DefaultValue="01/02/2014" Name="END_DATE" />
<asp:Parameter DefaultValue="0" Name="LCT_ID" Type="Int32" />
<asp:Parameter DefaultValue="0" Name="CompanyId" Type="Int32" />
<asp:Parameter Name="USER_ID" />
</SelectParameters>
</asp:SqlDataSource>

<asp:SqlDataSource ID="dtsVENDOR" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="ezman.SP_REPORT_LCT_ORDER_TOTALS_VEN" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DbType="Date" DefaultValue="01/01/2014" Name="START_DATE" />
<asp:Parameter DbType="Date" DefaultValue="01/02/2014" Name="END_DATE" />
<asp:Parameter DefaultValue="0" Name="LCT_ID" Type="Int32" />
<asp:Parameter DefaultValue="0" Name="CompanyId" Type="Int32" />
<asp:Parameter Name="USER_ID" />
</SelectParameters>
</asp:SqlDataSource>



<asp:SqlDataSource ID="dtsItem" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="ezman.SP_REPORT_LCT_ORDER_TOTALS_ITEM" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DbType="Date" DefaultValue="01/01/2014" Name="START_DATE" />
<asp:Parameter DbType="Date" DefaultValue="01/02/2014" Name="END_DATE" />
<asp:Parameter DefaultValue="0" Name="LCT_ID" Type="Int32" />
<asp:Parameter DefaultValue="0" Name="CompanyId" Type="Int32" />
<asp:Parameter Name="USER_ID" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="dtsStatus" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="ezman.SP_REPORT_LCT_ORDER_STATUS" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DbType="Date" DefaultValue="01/01/2014" Name="START_DATE" />
<asp:Parameter DbType="Date" DefaultValue="01/02/2014" Name="END_DATE" />
<asp:Parameter DefaultValue="0" Name="LCT_ID" Type="Int32" />
<asp:Parameter DefaultValue="0" Name="CompanyId" Type="Int32" />
<asp:Parameter Name="USER_ID" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="dtsOrders" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="ezman.SP_REPORT_LCT_ORDERS_BYDATE" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DbType="Date" DefaultValue="01/01/2014" Name="START_DATE" />
<asp:Parameter DbType="Date" DefaultValue="01/02/2014" Name="END_DATE" />
<asp:Parameter DefaultValue="0" Name="LCT_ID" Type="Int32" />
<asp:Parameter DefaultValue="0" Name="CompanyId" Type="Int32" />
<asp:Parameter Name="USER_ID" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="dtsPOS" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="SELECT * from ezman.V_CREATED_PO_WITH_TOTALS WHERE LCT_ID =@LCT_ID and CompanyId=@CompanyId AND (OrderCreateTime between convert(varchar(10),@Start_Date,101) and convert(varchar(10),@End_Date,101)) ORDER BY CreateDateTime Desc ">
<SelectParameters>


<asp:Parameter Name="Lct_Id" DefaultValue="0" />
<asp:Parameter Name="Start_Date" DefaultValue="01/01/2014" />
<asp:Parameter Name="End_Date" DefaultValue="06/01/2014" />
<asp:Parameter DefaultValue="0" Name="CompanyId" Type="Int32" />


</SelectParameters>
</asp:SqlDataSource>

<asp:SqlDataSource ID="dtsToday" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="SELECT * from V_ORD_HDR WHERE CONVERT(VARCHAR(10),ORDER_CREATE_TIME,101)=CONVERT (VARCHAR(10),GETDATE(),101) AND LCT_ID IN (SELECT LCT_ID from V_LCT_USER WHERE USERID=@USER_ID and CompanyId=@CompanyId) order by ORDER_CREATE_TIME DESC">
<SelectParameters>
<asp:Parameter Name="USER_ID" />
<asp:Parameter DefaultValue="0" Name="CompanyId" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>

<asp:SqlDataSource ID="dtsTodaysDel" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="SELECT * from ezman.V_CREATED_PO WHERE CONVERT(VARCHAR(10),[Delivery Date],101)=CONVERT(VARCHAR(10),GETDATE(),101) AND LCT_ID IN (SELECT LCT_ID from V_LCT_USER WHERE USERID=@USER_ID and CompanyId=@CompanyId)">
<SelectParameters>
<asp:Parameter Name="USER_ID" />
<asp:Parameter DefaultValue="0" Name="CompanyId" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>


<asp:SqlDataSource ID="dtsLocations" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="SELECT * from TB_LCT WHERE COMPANYID=@COMPANYID AND LCT_ID IN (SELECT LCT_ID from TB_LCT_USER WHERE USER_ID=@USERID) order by OrderNo">
<SelectParameters>
<asp:Parameter Name="USERID" />
<asp:Parameter Name="COMPANYID" DefaultValue="0" />
</SelectParameters>
</asp:SqlDataSource>


<asp:SqlDataSource ID="dtsPOO" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="ezman.[SP_REPORT_LCT_ORDER_TOTALS_POO]" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DbType="Date" DefaultValue="04/01/2014" Name="START_DATE" />
<asp:Parameter DbType="Date" DefaultValue="05/01/2014" Name="END_DATE" />
<asp:Parameter DefaultValue="3" Name="LCT_ID" Type="Int32" />
<asp:Parameter DefaultValue="950DAC7E-58F9-4A51-99C8-F001EB6B555D" Name="USER_ID" />
<asp:Parameter DefaultValue="1000" Name="CompanyId" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>



<asp:SqlDataSource ID="dtsYtdWaitingOrders" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultCon %>" SelectCommand="SELECT LCT_NAME,(ORD_HDR_NAME +'('+ ORD_HDR_DESC +')') AS ORD_DESC,ORDER_CREATE_TIME,PoInit,OrdFallowerUserN ame FROM dbo.V_ORD_HDR WHERE LCT_ID IN (SELECT LCT_ID from V_LCT_USER WHERE USERID=@USER_ID and CompanyId=@CompanyId) and ORDER_STATUS_TYPE_ID=14 AND ORDER_CREATE_TIME > DATEADD(M,-3,GETDATE()) ORDER BY ORD_HDR_ID">
<SelectParameters>
<asp:Parameter Name="USER_ID" />
<asp:Parameter DefaultValue="1000" Name="CompanyId" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>

</form>

</body>
</html>


My code behind is below



Public Class BasicDashboard
Inherits System.Web.UI.Page

Dim Store1 As Object



Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Usertheme.ApplyUserTheme(ResourceManager1, Users.CurrentUserId, Request.Browser.IsMobileDevice)





Try

JSON.RequestSettings = New Newtonsoft.Json.JsonSerializerSettings()
JSON.RequestSettings.DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Local
If Ext.Net.X.IsAjaxRequest = False Then
Dim CalcDate As DateTime
CalcDate = Today.AddDays(-1.0 * Today.Day + 1)

Dim original As DateTime = DateTime.Now ' The date you want to get the last day of the month for
Dim lastOfMonth As DateTime = original.Date.AddDays(-(original.Day - 1)).AddMonths(1).AddDays(-1)

DateField2.Text = lastOfMonth
'DateField1.Text = DateAdd(DateInterval.Day, -30, DateField2.Value)

DateField1.Text = CalcDate


Dim date1 As Date = DateField1.Text
Dim date2 As Date = lastOfMonth

dtsLocations.SelectParameters("USERID").DefaultValue = Users.CurrentUserId
dtsLocations.SelectParameters("COMPANYID").DefaultValue = Users.CurrentCompanyId
dtsLocations.DataBind()
cmbLocation.GetStore.DataBind()
cmbLocation.SelectedItem.Value = Users.Get_User_Main_Location_Id(Users.CurrentUserI d)




GetReport(cmbLocation.SelectedItem.Value, Users.CurrentUserId, date1.ToString("MM/dd/yyyy"), date2.ToString("MM/dd/yyyy"), Users.CurrentCompanyId)

dtsYtdWaitingOrders.SelectParameters("USER_ID").DefaultValue = Users.CurrentUserId
dtsYtdWaitingOrders.DataBind()
storeYTDPending.DataBind()
GridPanel3.GetStore.DataBind()


End If
Catch ex As Exception
Ext.Net.X.Msg.Alert("Error", ex.Message).Show()

End Try

End Sub
Public Sub RunReport()
Dim date1 As Date = DateField1.Text
Dim date2 As Date = DateField2.Text

GetReport(cmbLocation.SelectedItem.Value, Users.CurrentUserId, date1.ToString("MM/dd/yyyy"), date2.ToString("MM/dd/yyyy"), Users.CurrentCompanyId)


End Sub
Public Sub CellClickedEventYTDPending()

End Sub

Public Sub PrevMonth()

Dim date1 As Date = DateField1.Text
Dim date2 As Date = DateField2.Text
DateField1.Text = DateAdd(DateInterval.Month, -1, date1)
DateField2.Text = DateAdd(DateInterval.Month, -1, date2)
date1 = DateField1.Text
date2 = DateField2.Text
GetReport(cmbLocation.SelectedItem.Value, Users.CurrentUserId, date1.ToString("MM/dd/yyyy"), date2.ToString("MM/dd/yyyy"), Users.CurrentCompanyId)
End Sub
Public Sub Nextmonth()
Dim date1 As Date = DateField1.Text
Dim date2 As Date = DateField2.Text
DateField1.Text = DateAdd(DateInterval.Month, 1, date1)
DateField2.Text = DateAdd(DateInterval.Month, 1, date2)
date1 = DateField1.Text
date2 = DateField2.Text

GetReport(cmbLocation.SelectedItem.Value, Users.CurrentUserId, date1.ToString("MM/dd/yyyy"), date2.ToString("MM/dd/yyyy"), Users.CurrentCompanyId)

End Sub


Public Sub YTD()

Dim year As New DateTime(DateTime.Now.Year, 1, 1)
DateField1.Text = year
DateField2.Text = Today
Dim date1 As DateTime = DateField1.Text
Dim date2 As DateTime = DateField2.Text

GetReport(cmbLocation.SelectedItem.Value, Users.CurrentUserId, date1.ToString("MM/dd/yyyy"), date2.ToString("MM/dd/yyyy"), Users.CurrentCompanyId)


End Sub
Public Sub GetReport(ByVal LCTID As String, USERID As String, STARTDATE As Date, ENDDATE As Date, CompanyId As String)
Try
If Not STARTDATE < "01/01/2014" Then
dtsBudget.SelectParameters("LCT_ID").DefaultValue = LCTID
dtsBudget.SelectParameters("User_Id").DefaultValue = USERID
dtsBudget.SelectParameters("Start_Date").DefaultValue = STARTDATE
dtsBudget.SelectParameters("End_Date").DefaultValue = ENDDATE
dtsBudget.SelectParameters("CompanyId").DefaultValue = CompanyId
dtsBudget.DataBind()

dtsStatus.SelectParameters("LCT_ID").DefaultValue = LCTID
dtsStatus.SelectParameters("User_Id").DefaultValue = USERID
dtsStatus.SelectParameters("Start_Date").DefaultValue = STARTDATE
dtsStatus.SelectParameters("End_Date").DefaultValue = ENDDATE
dtsStatus.SelectParameters("CompanyId").DefaultValue = CompanyId
dtsStatus.DataBind()

dtsCatGrid1.SelectParameters("LCT_ID").DefaultValue = LCTID
dtsCatGrid1.SelectParameters("User_Id").DefaultValue = USERID
dtsCatGrid1.SelectParameters("Start_Date").DefaultValue = STARTDATE
dtsCatGrid1.SelectParameters("End_Date").DefaultValue = ENDDATE
dtsCatGrid1.SelectParameters("CompanyId").DefaultValue = CompanyId




dtsVENDOR.SelectParameters("LCT_ID").DefaultValue = LCTID
dtsVENDOR.SelectParameters("User_Id").DefaultValue = USERID
dtsVENDOR.SelectParameters("Start_Date").DefaultValue = STARTDATE
dtsVENDOR.SelectParameters("End_Date").DefaultValue = ENDDATE
dtsVENDOR.SelectParameters("CompanyId").DefaultValue = CompanyId
dtsVENDOR.DataBind()
storeVEN.DataBind()


dtsItem.SelectParameters("LCT_ID").DefaultValue = LCTID
dtsItem.SelectParameters("User_Id").DefaultValue = USERID
dtsItem.SelectParameters("Start_Date").DefaultValue = STARTDATE
dtsItem.SelectParameters("End_Date").DefaultValue = ENDDATE
dtsItem.SelectParameters("CompanyId").DefaultValue = CompanyId
dtsItem.DataBind()


dtsOrders.SelectParameters("LCT_ID").DefaultValue = LCTID
dtsOrders.SelectParameters("User_Id").DefaultValue = USERID
dtsOrders.SelectParameters("Start_Date").DefaultValue = STARTDATE
dtsOrders.SelectParameters("End_Date").DefaultValue = ENDDATE
dtsOrders.SelectParameters("CompanyId").DefaultValue = CompanyId
dtsOrders.DataBind()
storeOrders.DataBind()


dtsToday.SelectParameters("USER_ID").DefaultValue = USERID
dtsToday.SelectParameters("CompanyId").DefaultValue = CompanyId
dtsToday.DataBind()
storeToday.DataBind()


dtsTodaysDel.SelectParameters("USER_ID").DefaultValue = USERID
dtsTodaysDel.SelectParameters("CompanyId").DefaultValue = CompanyId
dtsTodaysDel.DataBind()
store2.DataBind()


dtsPOS.SelectParameters("START_DATE").DefaultValue = STARTDATE
dtsPOS.SelectParameters("END_DATE").DefaultValue = ENDDATE
dtsPOS.SelectParameters("LCT_ID").DefaultValue = LCTID
dtsPOS.SelectParameters("CompanyId").DefaultValue = CompanyId

dtsPOS.DataBind()
storeShipments.DataBind()




Dim dtb As New DataTable
dtb = ezmanHelper.Report.Budget_Report(STARTDATE, ENDDATE, LCTID, USERID, CompanyId)
Dim spent, limit, remaining As Double
spent = dtb.Rows(0).Item(1).ToString
limit = dtb.Rows(0).Item(2).ToString

remaining = limit - spent


txtTotalSpent.Text = FormatCurrency(spent, 2)
txtBudget.Text = FormatCurrency(limit, 2)
txtRemaining.Text = FormatCurrency(remaining, 2)


txtSpent1.Text = FormatCurrency(spent, 2)
txtbudget1.Text = FormatCurrency(limit, 2)
txtRemaining1.Text = FormatCurrency(remaining, 2)


If spent > limit Then
lblDescription.Text = "Location spent " & FormatCurrency(remaining, 2) & "over the their budget"
End If

If spent < limit Then
lblDescription.Text = "Location has " & FormatCurrency(remaining, 2) & " remaining balance."
End If

If spent = limit Then
lblDescription.Text = "Location spent their budget."
End If


gpanelW.GetStore().DataBind()
Dim dtb1 As New DataTable
dtsCat.SelectParameters("LCT_ID").DefaultValue = LCTID
dtsCat.SelectParameters("User_Id").DefaultValue = USERID
dtsCat.SelectParameters("Start_Date").DefaultValue = STARTDATE
dtsCat.SelectParameters("End_Date").DefaultValue = ENDDATE
dtsCat.SelectParameters("CompanyId").DefaultValue = CompanyId


If Users.IsUserInRole(Users.CurrentUserId, Users.GetRoleId("Multi Location Report")) Then
dtsCat.SelectCommand = "ezman.SP_REPORT_LCT_ORDER_TOTALS_MULTI"
Panel1.Title = "Multi location costs chart.<font color='red'> Admins only </font>"
storeTotalsCat.DataBind()
dtb1 = ezmanHelper.Report.Budget_Report_By_Lct_Multi(Date Field1.Text, ENDDATE, 3, USERID, CompanyId)

Else
Panel1.Title = "Amounts in Categories"
dtb1 = ezmanHelper.Report.Budget_Report_By_Cat(DateField1 .Text, ENDDATE, 3, USERID, CompanyId)

End If
dtsCat.DataBind()

Dim nax As New Ext.Net.NumericAxis
nax = Chart1.Axes(0)
nax.Maximum = dtb1.Rows(0).Item(1).ToString
nax.Minimum = dtb1.Rows(dtb1.Rows.Count - 1).Item(1).ToString / 2
Chart1.GetStore.DataBind()
Chart1.DataBind()
Chart1.Render()

chartStatus.GetStore().DataBind()




budgetChart.GetStore().DataBind()


budgetChart.Axes(0).Maximum = limit




budgetChart.Render()
gpanelPOS.Render()


dtsPOO.SelectParameters("START_DATE").DefaultValue = STARTDATE
dtsPOO.SelectParameters("END_DATE").DefaultValue = ENDDATE
dtsPOO.SelectParameters("LCT_ID").DefaultValue = LCTID
dtsPOO.SelectParameters("USER_ID").DefaultValue = Users.CurrentUserId
dtsPOO.SelectParameters("CompanyId").DefaultValue = Users.CurrentCompanyId
dtsPOO.DataBind()
Chart2.GetStore.DataBind()


'txtTotalSpent.Text = FormatCurrency(spent, 2)
'txtBudget.Text = FormatCurrency(limit, 2)
'txtRemaining.Text = FormatCurrency(remaining, 2)


Else
Ext.Net.X.Msg.Alert("Response", "Check the dates....").Show()



End If


Catch EX As Exception
End Try

End Sub

Public Sub dblclickRow()

'Dim ChckSelect As New Ext.Net.CheckboxSelectionModel
'ChckSelect.ID = "selectedRow"
'gpanel1.SelectionModel.Add(ChckSelect)

Dim sm As Ext.Net.RowSelectionModel = TryCast(Me.gpanelW.SelectionModel.Primary, Ext.Net.RowSelectionModel)

Dim itemnumber As Integer = 0
For Each row As Ext.Net.SelectedRow In sm.SelectedRows
itemnumber = itemnumber + 1
Dim ItemId As Integer = row.RecordID
Dim WinItemComments As New Ext.Net.Window
WinItemComments.ID = "ItemLLLLLL" & itemnumber
WinItemComments.Title = ezmanHelper.Items.Get_ItemNameWithItemId(row.Recor dID)
WinItemComments.Width = Unit.Pixel(1000)
WinItemComments.Height = Unit.Pixel(600)
WinItemComments.Modal = False
WinItemComments.Maximized = True

WinItemComments.CloseAction = CloseAction.Destroy
WinItemComments.AutoRender = False
WinItemComments.Collapsible = True
WinItemComments.Maximizable = True
WinItemComments.Loader = New Ext.Net.ComponentLoader
WinItemComments.Loader.Url = "~/DataWareHouse/ItemsDetail.aspx?ItemId=" & ItemId & "&IsNewItem=No"

WinItemComments.Loader.Mode = LoadMode.Frame
WinItemComments.Loader.LoadMask.ShowMask = True
WinItemComments.Loader.LoadMask.UseMsg = True
WinItemComments.Loader.LoadMask.Msg = "Loading Item's Page"
WinItemComments.Render(Me.Form)
WinItemComments.Show()


Next





End Sub

Public Sub HandleCommand(ByVal sender As Object, ByVal e As Ext.Net.DirectEventArgs)

Dim mJson As String = e.ExtraParams("amk")

Dim table As Dictionary(Of String, String)() = JSON.Deserialize(Of Dictionary(Of String, String)())(mJson)

Dim ordhdrid, poinit As String


For Each rowItem As Dictionary(Of String, String) In table
ordhdrid = rowItem("ORD_HDR_ID").Trim()
Next


Dim WinItemComments As New Ext.Net.Window
WinItemComments.ID = "ItemLLLLLL" & ordhdrid
WinItemComments.Title = "You are viewing....<b>" & ezmanHelper.orders.GetPoInit(ordhdrid) & "</b>"
WinItemComments.Icon = Icon.Eye
WinItemComments.Width = Unit.Pixel(1000)
WinItemComments.Height = Unit.Pixel(600)
WinItemComments.Modal = False
WinItemComments.Maximized = True

WinItemComments.CloseAction = CloseAction.Destroy
WinItemComments.AutoRender = False
WinItemComments.Collapsible = True
WinItemComments.Maximizable = True
WinItemComments.Loader = New Ext.Net.ComponentLoader
WinItemComments.Loader.Url = "~/Details/ViewSelectedOrder.aspx?OrdHdrID=" & ordhdrid


WinItemComments.Loader.Mode = LoadMode.Frame
WinItemComments.Loader.LoadMask.ShowMask = True
WinItemComments.Loader.LoadMask.UseMsg = True
WinItemComments.Loader.LoadMask.Msg = "Loading Order Detail"
WinItemComments.Render(Me.Form)
WinItemComments.Show()


'Loader.Url = "ViewSelectedOrder.aspx?OrdHdrID=" & OrdHdrId


End Sub
Public Sub CellClickedEvent(ByVal sender As Object, ByVal e As DirectEventArgs)
Dim PoId As Integer = e.ExtraParams("PoId")
Dim WebLink As String = e.ExtraParams("WebLink")


Dim WinItemComments As New Ext.Net.Window
WinItemComments.ID = "PO"
WinItemComments.Title = "Purchase Order "
WinItemComments.Width = Unit.Pixel(1000)
WinItemComments.Height = Unit.Pixel(600)
WinItemComments.Modal = True
WinItemComments.CloseAction = CloseAction.Destroy
WinItemComments.AutoRender = False
WinItemComments.Collapsible = True
WinItemComments.Maximizable = True
WinItemComments.Loader = New Ext.Net.ComponentLoader
WinItemComments.Loader.Url = WebLink.Replace("~", "http://www.maintelligent.com")
WinItemComments.Loader.Mode = LoadMode.Frame
WinItemComments.Loader.LoadMask.ShowMask = True
WinItemComments.Loader.LoadMask.UseMsg = True
WinItemComments.Loader.LoadMask.Msg = "Loading"
WinItemComments.Render(Me.Form)
WinItemComments.Show()

End Sub


Public Sub YTDCellClickedEvent(ByVal sender As Object, ByVal e As DirectEventArgs)
Dim PoId As String = e.ExtraParams("PoId")

Dim ordhdrid As String = Mid(PoId, 3, 100)
Dim WinItemComments As New Ext.Net.Window
WinItemComments.ID = "ItemLLLLLL" & ordhdrid
WinItemComments.Title = "You are viewing....<b>" & PoId & "</b>"
WinItemComments.Icon = Icon.Eye
WinItemComments.Width = Unit.Pixel(1000)
WinItemComments.Height = Unit.Pixel(600)
WinItemComments.Modal = False
WinItemComments.Maximized = True

WinItemComments.CloseAction = CloseAction.Destroy
WinItemComments.AutoRender = False
WinItemComments.Collapsible = True
WinItemComments.Maximizable = True
WinItemComments.Loader = New Ext.Net.ComponentLoader
WinItemComments.Loader.Url = "~/Details/ViewSelectedOrder.aspx?OrdHdrID=" & ordhdrid


WinItemComments.Loader.Mode = LoadMode.Frame
WinItemComments.Loader.LoadMask.ShowMask = True
WinItemComments.Loader.LoadMask.UseMsg = True
WinItemComments.Loader.LoadMask.Msg = "Loading Order Detail"
WinItemComments.Render(Me.Form)
WinItemComments.Show()

End Sub


End Class


20491

geoffrey.mcgill
Feb 06, 2015, 4:18 AM
Your sample does not work. Please simplify. Remove all code that is not directly related to the problem. Ensure you code sample can be copy + paste into a test project without having to make changes.

If the sample throws Exceptions or requires us to modify your code to get it working, then it is unlikely you will get a response from the Ext.NET support team.

Please review Forum Guidelines.

ebeker
Feb 10, 2015, 3:22 AM
Here is paste and run code. Sorry it took longer than i expected for me to paste clean code. Basically this form is not working on some screens (1600x900)



<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">

<title></title>
<style>
.mycss {
font-weight: normal;
color: #000000;
letter-spacing: 1pt;
word-spacing: -20pt;
font-size: 12px;
text-align: left;
font-family: Arial;
line-height: 1;
}

.borderer {
border: dotted;
}
</style>

</head>



<script type="text/javascript">
var updateTotal = function (grid, container) {
if (!grid.view.rendered) {
return;
}

var field,
value,
width,
data = { test1: 0, test2: 0, test3: 0 },
c,
cs = grid.headerCt.getVisibleGridColumns();

for (var j = 0, jlen = grid.store.getCount() ; j < jlen; j++) {
var r = grid.store.getAt(j);

for (var i = 0, len = cs.length; i < len; i++) {
c = cs[i];
if (c.dataIndex) {
data[c.dataIndex] += r.get(c.dataIndex);
}
}
}

container.suspendLayout = true;
for (var i = 0; i < cs.length; i++) {
c = cs[i];
value = data[c.dataIndex];

field = container.down('component[name="' + c.dataIndex + '"]');

container.remove(field, false);
container.insert(i, field);
width = c.getWidth();
field.setWidth(width - 1);
field.setValue(c.renderer ? (c.renderer)(value, {}, {}, 0, i, grid.store, grid.view) : value);
}

container.items.each(function (field) {
var column = grid.headerCt.down('component[dataIndex="' + field.name + '"]');
field.setVisible(column.isVisible());
});

container.suspendLayout = false;
container.updateLayout();
};
var onKeyUp = function () {
var me = this,
v = me.getValue(),
field;

if (me.startDateField) {
field = Ext.getCmp(me.startDateField);
field.setMaxValue(v);
me.dateRangeMax = v;
} else if (me.endDateField) {
field = Ext.getCmp(me.endDateField);
field.setMinValue(v);
me.dateRangeMin = v;
}

field.validate();
};

</script>


<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>


<ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout" >

<Items>
<ext:Panel Height="200" ID="Panel1" Collapsed="true" Collapsible="true"
runat="server" Header="True" Title="$ Amounts in Categories"
Region="South" Layout="FitLayout">


<Items>


</Items>
<BottomBar>
</BottomBar>

</ext:Panel>

<ext:Panel Collapsed="false" AutoScroll="True" Collapsible="false" ID="pnlEast" Frame="true" Border="true"
runat="server"
Header="true"
HeaderPosition="Top"
TitleAlign="Center"
Width="300"
Region="East"
Title="Today's PAGE"
Layout="FormLayout">

<Items>


<ext:GridPanel runat="server" MaxHeight="400" AutoScroll="true" Scroll="Vertical" Flex="1" ID="gpanelToday" Header="true" Title="Today's Created Orders">

</ext:GridPanel>

<ext:GridPanel Scroll="Vertical" AutoScroll="true" MaxHeight="400" runat="server" Flex="1" ID="GridPanel1" Header="true" Title="Today's Deliveries">

</ext:GridPanel>


</Items>
</ext:Panel>
<ext:Panel runat="server" BodyPadding="5" AutoScroll="true" ID="pnlCenter" TitleAlign="Center" TitleCollapse="true" Title="Budget Report / Order Status" Header="true" Region="Center" Layout="FormLayout">
<TopBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>

<ext:ComboBox ForceSelection="true" QueryMode="Local" ID="cmbLocation" DisplayField="LCT_NAME" ValueField="LCT_ID" FieldLabel="Location" LabelAlign="left" EmptyText="Select Location" runat="server">

</ext:ComboBox>
<ext:DateField
ID="DateField1"
runat="server"
Vtype="daterange"
MinText="Date can not be earlier than 01/01/2014"
MinDate="01/01/2014"
FieldLabel="Date Range"
LabelAlign="Right"
EmptyText="Start Date"
EnableKeyEvents="true">
<CustomConfig>
<ext:ConfigItem Name="endDateField" Value="DateField2" Mode="Value" />
</CustomConfig>

</ext:DateField>



<ext:DateField
ID="DateField2"
runat="server"
Vtype="daterange"
EmptyText="End Date"
EnableKeyEvents="true">
<CustomConfig>
<ext:ConfigItem Name="startDateField" Value="DateField1" Mode="Value" />
</CustomConfig>

</ext:DateField>



<ext:Button runat="server" ID="btnRub" Text="Run" Icon="ColorWheel">


</ext:Button>

<ext:Button runat="server" ID="Button1" Icon="PreviousGreen" ToolTip="Previous Month">

</ext:Button>

<ext:Button runat="server" ID="Button2" Icon="NextGreen" ToolTip="Next Month">

</ext:Button>

<ext:Button runat="server" ID="Button3" ToolTip="YTD" Icon="ForwardGreen">


</ext:Button>





<ext:ToolbarFill ID="ToolbarFill2" runat="server"></ext:ToolbarFill>
<ext:ToolbarFill ID="ToolbarFill1" runat="server"></ext:ToolbarFill>

<ext:Button runat="server" Icon="ArrowRefresh" ID="btnRefresh" Text="Refresh Dashboard">
<Listeners>
<Click Handler="window.location.reload();"></Click>

</Listeners>

</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<Items>

<ext:FieldSet Height="300" Border="True" Title="Purpose Of Orders" ID="FieldSet1" Layout="HBoxLayout" runat="server">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch"></ext:HBoxLayoutConfig>
</LayoutConfig>
<Items>





</Items>

</ext:FieldSet>

<ext:FieldSet ID="FieldSet2" Height="200" Border="True" Title="Order Statuses" runat="server" Layout="HBoxLayout">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch"></ext:HBoxLayoutConfig>
</LayoutConfig>
<Items>

<ext:GridPanel runat="server" ID="gpanelOrders" Flex="5" Layout="FitLayout">

</ext:GridPanel>

</Items>
</ext:FieldSet>


<ext:FieldSet Height="200" Border="True" Title="Budget Report" ID="AdMCIK" Layout="HBoxLayout" runat="server">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch"></ext:HBoxLayoutConfig>
</LayoutConfig>
<Items>



<ext:GridPanel runat="server" Flex="5" ID="gpanelPOS">


</ext:GridPanel>


</Items>

</ext:FieldSet>




</Items>
<BottomBar>
<ext:StatusBar ID="StatusBar1" runat="server">
<Items>
<ext:Label runat="server" ID="lblDescription"></ext:Label>
<ext:ToolbarFill ID="ToolbarFill3" runat="server"></ext:ToolbarFill>
<ext:TextField runat="server" ID="txtbudget1" FieldStyle="text-align: right;" Note="Budget" ReadOnly="true" Text=""></ext:TextField>
<ext:TextField runat="server" ID="txtSpent1" FieldStyle="text-align: right;" Note="spent" ReadOnly="true" Text=""></ext:TextField>
<ext:TextField runat="server" ID="txtRemaining1" FieldStyle="text-align: right;" Note="Remaining" ReadOnly="true" Text=""></ext:TextField>
</Items>
</ext:StatusBar>
</BottomBar>
</ext:Panel>

<ext:TabPanel ID="westpanelk" Collapsed="true" Collapsible="true" TitleAlign="Center" Title="Summary" Layout="FitLayout" runat="server" Region="West" Width="375">
<Items>
<ext:GridPanel runat="server" ID="gpanelW" Title="Items">

</ext:GridPanel>
<ext:GridPanel runat="server" ID="byCategory" Title="Categories">


</ext:GridPanel>


<ext:GridPanel runat="server" ID="GridPanel2" Title="Vendor">


</ext:GridPanel>

</Items>
<BottomBar>
<ext:Toolbar ID="Toolbar2" Layout="HBoxLayout" runat="server">
<Items>

<ext:DisplayField Flex="1" ID="txtTotalSpent" runat="server" Note="Total Spent" ReadOnly="true"></ext:DisplayField>
<ext:DisplayField Flex="1" ID="txtBudget" runat="server" Note="Budget" ReadOnly="true"></ext:DisplayField>
<ext:DisplayField Flex="1" ID="txtRemaining" runat="server" Note="Remaining" ReadOnly="true"></ext:DisplayField>
</Items>
</ext:Toolbar>
</BottomBar>
</ext:TabPanel>


</Items>


</ext:Viewport>


</form>

</body>
</html>

Daniil
Feb 11, 2015, 3:42 PM
after pressing any button on to page(it refreshes the page data) on the second rendiring/refresh/load all controls stop working , buttons are not firing... , panels are not collapsing.

I am not sure that I clearly understand the steps to reproduce, but I tried something and cannot reproduce.

A couple of questions for now.

1. Can you reproduce the issue with the latest Ext.NET from SVN trunk (upcoming 3.1.0 release)? We would highly recommend to use it.

2. Then the page is broken, do you use any JavaScript or other errors in a Chrome console?

ebeker
Feb 12, 2015, 10:13 PM
You can close this thread i can not really find a reason for page to be broken , so i can t make a question , i am still working on it to find out why it is not working on some computers later on i will open another thread with more specific questions.

Answers to your questions.

1-) Yes i am using the latest 3.1 from trunk
2-) Yes i am using javascript on that page.