Xpath, find node between two other nodes - xpath

I need to construct a generic XPath to find the correct node, where the criteria are date and time. e.g. to find the node for "03 May", "12:17:44"
The XML has has a date and time tag.
Inconveniently, the date tag is populated only for the first occurrence of the day. (The time tag is always populated)
I have tried this:
/itemisationTable/row[#Date="03 May"]/following-sibling::row[#Time="12:17:44"]
it works fine, but it is not correct, because this
/itemisationTable/row[#Date="03 May"]/following-sibling::row[#Time="21:12:06"]
also finds a result, which it should not.
My other problem is that
/itemisationTable/row[#Date="03 May"]/following-sibling::row[#Time="09:34:13"]
should find a node but it does not.
I would be greatful if someone could help me with the XPath for this, as it exceeds my Xpath skills.
Here is a snippet of the XML
<itemisationTable index="1" name="Belgium - SMS/Data" total="1.522">
<row Date="03 May" Time="09:34:13" Number="xphone.com" Description="Roaming Data" Origin="Belgium" Destination="Other Provider" InBundle="" Taxable="T" Duration="12.57 MB" Cost_exc_VAT="1.258" />
<row Date="" Time="10:43:41" Number="4428" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="" Time="10:43:44" Number="4428" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="" Time="12:17:44" Number="4408" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="" Time="21:10:50" Number="4412" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="" Time="21:11:55" Number="4412" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="04 May" Time="21:12:06" Number="4412" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="" Time="21:22:34" Number="4412" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="" Time="21:23:23" Number="4412" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="" Time="21:23:31" Number="4412" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="05 May" Time="21:23:56" Number="4412" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="" Time="21:30:45" Number="4412" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="" Time="22:24:35" Number="4431" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="" Time="22:24:38" Number="4431" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
<row Date="06 May" Time="" Number="xphone.com" Description="Roaming Data" Origin="Belgium" Destination="Other Provider" InBundle="" Taxable="T" Duration="2.59 MB" Cost_exc_VAT="0.264" />
<row Date="" Time="07:09:15" Number="4483" Description="xphone SMS" Origin="Belgium" Destination="UK" InBundle="B" Taxable="" Duration="1" Cost_exc_VAT="0.000" />
</itemisationTable>

Tricky! This isn't particularly efficient, but it is a working solution (with XPath 2.0):
/itemisationTable
/row[#Date=$date]
/(self::row | following-sibling::row[
not(./preceding-sibling::row[#Date != ""][1]/#Date != $date)
][not(./#Date != "" and ./#Date != $date)])[#Time=$time]
With XPath 1.0, this gets hairier:
/itemisationTable
/row[#Date=$date]
/following-sibling::row[
not(./preceding-sibling::row[#Date != ""][1]/#Date != $date)
][not(./#Date != "" and ./#Date != $date)][#Time=$time]
| /itemisationTable/row[#Date=$date][not(./#Date != "" and ./#Date !=$date][#Time=$time]
Set $date and $time through your XPath engine -- in XMLStarlet, for instance, this would be --var date='"03 May"'; evaluating XPath in an XQuery engine it would be with declare variable $date="03 May"; etc.
The important thing is to use preceding-sibling to backtrack and look at whether you've crossed a boundary, ruling out any nodes for which that's true.
For a language with enough expressive power to build an efficient solution, I'd want to switch to XQuery.
To allow copy/paste testing, the below has been successfully used at http://www.freeformatter.com/xpath-tester.html:
/itemisationTable /row[#Date="03 May"] /following-sibling::row[ not(./preceding-sibling::row[#Date != ""][1]/#Date != "03 May") ][not(./#Date != "" and ./#Date != "03 May")][#Time="21:11:55"] | /itemisationTable/row[#Date="03 May"][not(./#Date != "" and ./#Date != "03 May")][#Time="21:11:55"]

Related

visual studio extensions command id for multiple project selection

I found IDM_VS_CTXT_PROJNODE for single project, and IDM_VS_CTXT_XPROJ_PROJITEM for multiple project but have to select one or more not project file. I want to create a command button like Build Selection.
EDIT:
vsct file:
<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Extern href="stdidcmd.h" />
<Extern href="vsshlids.h" />
<Commands package="guidMyMenuPackage">
<Menus>
<Menu guid="guidMyMenuPackageCmdSet" id="MyMenu" type="Menu" priority="0x0700">
<Strings>
<ButtonText>MyMenu</ButtonText>
</Strings>
</Menu>
</Menus>
<Groups>
<Group guid="guidMyMenuPackageCmdSet" id="RootGroup" priority="0x0600" />
<Group guid="guidMyMenuPackageCmdSet" id="MyMenuGroup" priority="0x0601" />
</Groups>
<Buttons>
<Button guid="guidMyMenuPackageCmdSet" id="cmdidButton1" priority="0x0101" type="Button">
<Strings>
<ButtonText>Button1</ButtonText>
</Strings>
</Button>
<Button guid="guidMyMenuPackageCmdSet" id="cmdidButton2" priority="0x0102" type="Button">
<Strings>
<ButtonText>Button2</ButtonText>
</Strings>
</Button>
</Buttons>
</Commands>
<CommandPlacements>
<CommandPlacement guid="guidMyMenuPackageCmdSet" id="RootGroup" priority="0x1011">
<!--for single project file-->
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE"/>
</CommandPlacement>
<CommandPlacement guid="guidMyMenuPackageCmdSet" id="MyMenu" priority="0x0001">
<Parent guid="guidMyMenuPackageCmdSet" id="RootGroup"/>
</CommandPlacement>
<CommandPlacement guid="guidMyMenuPackageCmdSet" id="MyMenuGroup" priority="0x0001">
<Parent guid="guidMyMenuPackageCmdSet" id="MyMenu"/>
</CommandPlacement>
<CommandPlacement guid="guidMyMenuPackageCmdSet" id="cmdidButton1" priority="0x0001">
<Parent guid="guidMyMenuPackageCmdSet" id="MyMenuGroup"/>
</CommandPlacement>
<CommandPlacement guid="guidMyMenuPackageCmdSet" id="cmdidButton2" priority="0x0002">
<Parent guid="guidMyMenuPackageCmdSet" id="MyMenuGroup"/>
</CommandPlacement>
</CommandPlacements>
<Symbols>
<GuidSymbol name="guidMyMenuPackage" value="{BDC1A8B0-8D78-43F9-A26F-234517DAF68E}" />
<GuidSymbol name="guidMyMenuPackageCmdSet" value="{FAACBD48-7657-4CFF-7BD4-39D77F9D1542}">
<IDSymbol name="RootGroup" value="0x1020"/>
<IDSymbol name="MyMenuGroup" value="0x1021"/>
<IDSymbol name="MyMenu" value="0x1022" />
<IDSymbol name="cmdidButton1" value="0x0101" />
<IDSymbol name="cmdidButton2" value="0x0102" />
</GuidSymbol>
</Symbols>
</CommandTable>

Passing a bearer token in a 'Web Test' without Visual Studio?

I want to import a ".webtest" in Azure's Application Insights availability feature. I dont have a test edition of Visual Studio, but this MSDN article suggests using Fiddler as another option to creating web tests.
I need to perform 2 requests on a REST API:
Request a bearer token from the connect/token endpoint.
Perform a GET at api/resources with the bearer token (retrieved from the above request) in the header.
It's a typical client credentials OAuth 2 flow.
I cannot seem to figure out how to do this with Fiddler. Basically I need to extract a value from the response body of request 1 and use it as the header value in request 2.
This is what the web test looks like without passing the token:
<?xml version="1.0" encoding="utf-8"?>
<TestCase Name="FiddlerGeneratedWebTest" Id="" Owner="" Description="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" DeploymentItemsEditable="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="" RequestCallbackClass="" TestCaseCallbackClass="">
<Items>
<Request Method="POST" Version="1.1" Url="https://example.com/connect/token" ThinkTime="8" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<Headers>
<Header Name="Content-Type" Value="application/x-www-form-urlencoded" />
</Headers>
<FormPostHttpBody ContentType="application/x-www-form-urlencoded">
<FormPostParameter Name="client_id" Value="myclientid" UrlEncode="True" />
<FormPostParameter Name="client_secret" Value="password123" UrlEncode="True" />
<FormPostParameter Name="grant_type" Value="client_credentials" UrlEncode="True" />
<FormPostParameter Name="scope" Value="myscopes" UrlEncode="True" />
</FormPostHttpBody>
</Request>
<Request Method="GET" Version="1.1" Url="https://example.com/api/resources" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<Headers>
<Header Name="Authorization" Value="Bearer {{token}}" />
</Headers>
</Request>
</Items>
</TestCase>
Assuming this comes back as the following example you can use a regex extraction to get it.
{"token_type":"Bearer","scope":"user_impersonation","expires_in":"3600 ... "access_token":"{{TOKEN}}", ...}
<?xml version="1.0" encoding="utf-8"?>
<TestCase Name="FiddlerGeneratedWebTest" Id="" Owner="" Description="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" DeploymentItemsEditable="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="" RequestCallbackClass="" TestCaseCallbackClass="">
<Items>
<Request Method="POST" Version="1.1" Url="https://example.com/connect/token" ThinkTime="8" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<ExtractionRules>
<ExtractionRule Classname="Microsoft.VisualStudio.TestTools.WebTesting.Rules.ExtractRegularExpression, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" VariableName="token" DisplayName="Extract Regular Expression" Description="Extract text from the response matching a regular expression and place it into the test context.">
<RuleParameters>
<RuleParameter Name="RegularExpression" Value=".*"access_token":"([^"]*)".*" />
<RuleParameter Name="IgnoreCase" Value="True" />
<RuleParameter Name="Required" Value="True" />
<RuleParameter Name="Index" Value="0" />
<RuleParameter Name="HtmlDecode" Value="True" />
<RuleParameter Name="UseGroups" Value="True" />
</RuleParameters>
</ExtractionRule>
</ExtractionRules>
<Headers>
<Header Name="Content-Type" Value="application/x-www-form-urlencoded" />
</Headers>
<FormPostHttpBody ContentType="application/x-www-form-urlencoded">
<FormPostParameter Name="client_id" Value="myclientid" UrlEncode="True" />
<FormPostParameter Name="client_secret" Value="password123" UrlEncode="True" />
<FormPostParameter Name="grant_type" Value="client_credentials" UrlEncode="True" />
<FormPostParameter Name="scope" Value="myscopes" UrlEncode="True" />
</FormPostHttpBody>
</Request>
<Request Method="GET" Version="1.1" Url="https://example.com/api/resources" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<Headers>
<Header Name="Authorization" Value="Bearer {{token}}" />
</Headers>
</Request>
</Items>
</TestCase>
To compliment James Davis's answer, if you need to login to https://yourapp.com/auth/login by posting the JSON:
{
user: 'youruser',
password: 'yourpassword'
}
first base64 encode the json:
> echo "{user: 'youruser', password: 'yourpassword'}" | base64
e3VzZXI6ICd5b3VydXNlcicsIHBhc3N3b3JkOiAneW91cnBhc3N3b3JkJ30K
Then pass this base64 value in a StringHttpBody tag
<?xml version="1.0" encoding="utf-8"?>
<WebTest Name="login-healthcheck" Id="e91b6e1d-3fa0-475f-a18b-b694b463589c" Owner="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="0" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="default" StopOnError="False" RecordedResultFile="" ResultsLocale="">
<Items>
<Request Method="POST" Guid="ef9d1d00-5663-476a-a3cb-ccf49c4d2229" Version="1.1" Url="https://yourapp.com/auth/login" ThinkTime="8" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False">
<Headers>
<Header Name="Content-Type" Value="application/json" />
</Headers>
<ExtractionRules>
<ExtractionRule Classname="Microsoft.VisualStudio.TestTools.WebTesting.Rules.ExtractRegularExpression, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" VariableName="token" DisplayName="Extract Regular Expression" Description="Extract text from the response matching a regular expression and place it into the test context.">
<RuleParameters>
<RuleParameter Name="RegularExpression" Value=".*"access_token":"([^"]*)".*" />
<RuleParameter Name="IgnoreCase" Value="True" />
<RuleParameter Name="Required" Value="True" />
<RuleParameter Name="Index" Value="0" />
<RuleParameter Name="HtmlDecode" Value="True" />
<RuleParameter Name="UseGroups" Value="True" />
</RuleParameters>
</ExtractionRule>
</ExtractionRules>
<StringHttpBody ContentType="application/json" InsertByteOrderMark="False">e3VzZXI6ICd5b3VydXNlcicsIHBhc3N3b3JkOiAneW91cnBhc3N3b3JkJ30K</StringHttpBody>
</Request>
<Request Method="GET" Guid="d566422f-af74-47bf-90aa-0c66db6ef567" Version="1.1" Url="https://yourapp.com/api/v1/healthcheck" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False">
<Headers>
<Header Name="Authorization" Value="Bearer {{token}}" />
</Headers>
</Request>
</Items>
</WebTest>
Worked for me on Azure Application Insights Availability checking

apex 4 gantt chart task collapser missing

I used APEX 4.2 to create a Gantt chart with the AnyGantt Library.
When i use a custom XML for the Anygantt Diagram everythign works fine. As soon as i want to use custom datagrids, the collapser is missing.
My XML is the following:
<anygantt> <settings>
<navigation enabled="True" position="Top" size="30">
</navigation>
<editing allow_edit="true">
<rounding>
<date unit="Week" step="1" />
</rounding>
</editing>
<locale>
<date_time_format week_starts_from_monday="True">
<months>
<names>January,February,March,April,May,June,July,August,September,October,November,December</names>
<short_names>Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec</short_names>
</months>
<week_days>
<names>Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday</names>
<short_names>Sun,Mon,Tue,Wed,Thu,Fri,Sat</short_names>
</week_days>
<format>
<full>%yyyy.%MM.%dd.%HH.%mm.%ss</full>
<date>%yyyy.%MM.%dd</date>
<time>%HH.%mm.%ss</time>
</format>
</date_time_format>
</locale>
</settings>
<datagrid enabled="true" width="300">
<columns>
<column attribute_name="Name" width="200" cell_align="Left">
<header>
<text>Name</text>
</header>
<format>{%Name}</format>
</column>
<column width="40" cell_align="Left">
<header>
<text>Stunden</text>
</header>
<format>{%Stunden}</format>
</column>
</columns>
</datagrid>
<styles>
<defaults>
<period>
<period_style>
<bar_style>
<labels>
<label anchor="Center" valign="Center" halign="Center">
<text>{%DISPO} %</text>
<font face="Verdana" size="10" bold="true" color="White">
</font>
</label>
</labels>
</bar_style>
</period_style>
</period>
</defaults>
<period_styles>
<period_style name="test">
<bar_style>
<labels>
<label anchor="Center" valign="Center" halign="Center">
<text>Center</text>
<font face="Verdana" size="10" bold="true" color="White">
</font>
</label>
</labels>
<middle shape="Full">
<fill enabled="true" type="Solid" color="DarkSeaGreen" />
<border enabled="true" color="#FF0000" />
</middle>
</bar_style>
</period_style>
</period_styles>
</styles>
<resource_chart><resources><resource name="AVI" id="5"/>
<resource name="CAB" id="4"/>
<resource name="Test, Test (Test)" id="3-U837751" parent="3"/>
<resource name="PL" id="3"/>
<resource name="Struktur" id="2"/>
</resources><periods><period resource_id="3-U837751" name="NAME-3-U837751" start="2015.07.28 00:00" end="2015.07.31 00:00">
<attributes>
<attribute name="DISPO"><![CDATA[,5]]></attribute>
</attributes>
</period></periods></resource_chart>
You need to add cell_align="LeftLevelPadding" to the column where you want to see the collapser. Something like:
<column attribute_name="Name" width="200" cell_align="LeftLevelPadding">
This is described in KB: http://support.anychart.com/customer/portal/articles/2077851--anygantt-4-x-collapser-is-missing-in-datagrid-column
You can find more info on columns at
http://6.anychart.com/products/anygantt/docs/users-guide/index.html?columns.html

How to validate the controls in the form with the TabPanel controls in Ext.net

Hi I have to implement the validation functionality like if all the form controls with in the Tabpanels is valid then it should enable the "Save" button otherwise it should be disabled.
In this marked as * are required fields and corresponding Code Sa
<%# Page Language="C#" %>
<%# Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
<html>
<body>
<form id="form1" runat="server">
<div>
<ext:ResourceManager ID="reso" SourceFormatting="true" runat="server" />
<ext:Panel ID="MainPanel" runat="server" AutoHeight="true" Layout="VBoxLayout" Border="false"
AutoScroll="true">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Left" />
</LayoutConfig>
<Items>
<ext:Panel ID="pnlEditInfo" Header="false" Border="false" runat="server" Title="Basic Info"
Width="950" AutoHeight="true" AutoScroll="true" Layout="Form" ButtonAlign="Center"
Padding="5" MinHeight="550">
<Items>
<ext:FormPanel ID="fpnlCreateStatus" Cls="formBackground" runat="server" BodyCls="formheader"
Padding="5" ButtonAlign="Center" Layout="FormLayout" Frame="false" MonitorValid="true"
Width="850" Border="false">
<Items>
<ext:Container runat="server" ID="ContnOne" Layout="ColumnLayout" Width="700" MinHeight="120">
<Items>
<ext:Container runat="server" Layout="Form" ColumnWidth=".5" ID="ContOneChild">
<Items>
<ext:TextField ID="txtCompanyName" runat="server" FieldLabel="* Company Name" Cls="labelStyle"
AnchorHorizontal="95%" AllowBlank="false" BlankText="Company Name is required"
MaskRe="/[a-zA-Z0-9-. ]/" MaxLength="240" PaddingSpec="8 0 0 0" Width="350" LabelAlign="Right"
LabelWidth="135">
</ext:TextField>
<ext:TextField ID="txtShortName" MaskRe="/[A-Za-z/_/-/ ]/" Cls="labelStyle" MaxLength="25" LabelWidth="135" AllowBlank="false" BlankText="Short Name is required"
LabelAlign="Right" Width="350" runat="server" FieldLabel="* Short Name" AnchorHorizontal="95%" />
<ext:RadioGroup ID="rghasMultipleLoc" LabelWidth="135" LabelAlign="Right" runat="server"
FieldLabel="Has Multiple Locations?" Width="250">
<Items>
<ext:Radio ID="rdMultiLocYes" runat="server" BoxLabel="Yes" Checked="true" />
<ext:Radio ID="rdMultiLocNo" runat="server" BoxLabel="No" />
</Items>
</ext:RadioGroup>
</Items>
</ext:Container>
</Items>
</ext:Container>
<ext:TabPanel ID="tbpnlCompany" runat="server" Plain="true" Width="830"
Border="false">
<Items>
<ext:Panel ID="pnlProfile" runat="server" Title="Profile" Padding="10" Layout="Form"
Border="false" Height="130">
<Items>
<ext:FormPanel ID="frmCompProfile" Cls="formBackground" runat="server" BodyCls="formheader"
Padding="5" ButtonAlign="Center" Layout="FormLayout" Frame="false" MonitorValid="true"
Width="850" Border="false">
<Items>
<ext:TextArea ID="txtCompanyProfile" LabelAlign="Right" runat="server" FieldLabel="* Company Profile"
LabelWidth="150" Height="100" TabIndex="1" LabelStyle="font-weight: bold;" AllowBlank="false"
Width="500" BlankText="Company Profile is required" MaskRe="[a-zA-Z0-9!##$%^&*().-_ ]"
MaxLength="500" />
</Items>
<Listeners>
<ValidityChange Handler="#{btnSave}.setDisabled(!valid);" />
</Listeners>
</ext:FormPanel>
</Items>
</ext:Panel>
<ext:Panel ID="pnlAddress" runat="server" Title="Address" Padding="10" Layout="Form"
Border="false" Height="130">
<Items>
<ext:FormPanel ID="frmPanelAddress" Cls="formBackground" runat="server" BodyCls="formheader"
Padding="5" ButtonAlign="Center" Layout="FormLayout" Frame="false" MonitorValid="true"
Width="850" Border="false">
<Items>
<ext:TextField ID="txtAddress1" LabelAlign="Right" runat="server" FieldLabel="* Address1"
TabIndex="2" LabelStyle="font-weight: bold;" AllowBlank="false" Width="500" BlankText="Address1 is required"
MaskRe="[a-zA-Z0-9!##$%^&*().-_ ]" MaxLength="250" />
<ext:Panel ID="Panel1" runat="server" Layout="ColumnLayout" Border="false">
<Items>
<ext:Panel ID="Panel2" runat="server" Layout="ColumnLayout" ColumnWidth=".3" Border="false">
<Items>
<ext:TextField ID="txtCity" MaskRe="[A-Za-z ]" MaxLength="50" LabelAlign="Right"
runat="server" PaddingSpec="0 0 5 0" TabIndex="4" FieldLabel="City" Width="250"
RemoveClearTrigger="true" Cls="labelStyle" AllowBlank="false" BlankText="City Name is required">
</ext:TextField>
<ext:ComboBox ID="cbCountry" LabelAlign="Right" FieldLabel="* Country" LabelStyle="font-weight: bold;"
TabIndex="5" runat="server" Editable="false" DisplayField="CountryName" BlankText="Country is required"
AllowBlank="false" MsgTarget="Side" ValueField="CountryCode" EmptyText="Select"
Resizable="false" SelectOnFocus="true" Width="250">
<Items>
<ext:ListItem Text="India" Value="1">
</ext:ListItem>
<ext:ListItem Text="U.A.E" Value="3">
</ext:ListItem>
</Items>
</ext:ComboBox>
</Items>
</ext:Panel>
<ext:Panel ID="Panel3" runat="server" Layout="ColumnLayout" ColumnWidth=".3" Border="false">
<Items>
<ext:TextField ID="txtZIP" MaskRe="/[0-9]/" MinLength="6" LabelAlign="Right" runat="server"
TabIndex="6" FieldLabel="ZIP Code" Width="250" PaddingSpec="0 0 5 0" />
<ext:ComboBox ID="cbState" LabelAlign="Right" MsgTarget="Side" FieldLabel="* State"
TabIndex="7" AllowBlank="false" LabelStyle="font-weight: bold;" runat="server"
Editable="false" DisplayField="StateName" ValueField="StateCode" BlankText="State is required"
EmptyText="Select" Resizable="false" SelectOnFocus="true" Width="250">
<Items>
<ext:ListItem Text="Andhra Pradesh" Value="1">
</ext:ListItem>
<ext:ListItem Text="Kerala" Value="2">
</ext:ListItem>
<ext:ListItem Text="London" Value="5">
</ext:ListItem>
<ext:ListItem Text="Kentucky" Value="6">
</ext:ListItem>
</Items>
<SelectedItems>
<ext:ListItem Value="1">
</ext:ListItem>
</SelectedItems>
</ext:ComboBox>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
</Items>
<Listeners>
<ValidityChange Handler="#{btnSave}.setDisabled(!valid);" />
</Listeners>
</ext:FormPanel>
</Items>
</ext:Panel>
<ext:Panel ID="pnlCommunication" runat="server" Title="Communication" Border="false" TagString="Communication"
Height="130" Padding="10" Layout="Form">
<Items>
<ext:FormPanel ID="frmPnlCommunication" Cls="formBackground" runat="server" BodyCls="formheader"
Padding="5" ButtonAlign="Center" Layout="FormLayout" Frame="false" MonitorValid="true"
Width="850" Border="false">
<Items>
<ext:TextField ID="txtWebsite" LabelAlign="Right" Regex="/^[A-Za-z0-9-\.]+\.[A-Za-z]{2,4}\/?([^\s<>\#%\,\{\}\\|\\\^\[\]`]+)?$/"
MaxLength="25" InvalidText="Website is invalid" MsgTargetElement="lblErrorMsg" MsgTarget="Side"
runat="server" TabIndex="8" FieldLabel="Website" Width="500" RegexText="Enter Valid Website">
</ext:TextField>
<ext:TextField ID="txtEmailid" LabelAlign="Right" Regex="^(\w+)([-+.][\w]+)*#(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$"
MaxLength="50" TabIndex="9" RegexText="Enter correct emailid" runat="server"
FieldLabel="EmailID" Width="500" />
<ext:TextField ID="txtPhone" LabelAlign="Right" BlankText="Phone is required" runat="server"
TabIndex="10" FieldLabel="Phone" Width="500" MaskRe="/[0-9\-]/" MaxLength="25"
MaxLengthText="Maximum length for phone is 15" />
</Items>
<Listeners>
<ValidityChange Handler="#{btnSave}.setDisabled(!valid);" />
</Listeners>
</ext:FormPanel>
</Items>
</ext:Panel>
</Items>
</ext:TabPanel>
<ext:Panel runat="server" ID="pnlButtons" Height="30" Border="false" Width="600"
ButtonAlign="Center">
<Items>
<ext:Button ID="btnSave" runat="server" Cls="buttonstyle" Icon="Disk" Disabled="true"
Text="Save" TabIndex="24" X="250">
<Listeners>
</Listeners>
</ext:Button>
<ext:Button ID="btnCancel" runat="server" Cls="buttonstyle" Text="Cancel" Icon="Cancel"
X="260" TabIndex="25">
</ext:Button>
</Items>
</ext:Panel>
</Items>
<Listeners>
<ValidityChange Handler="#{btnSave}.setDisabled(!valid);" />
</Listeners>
</ext:FormPanel>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
</div>
</form>
</body>
</html>
Here it is working fine for the active tab controls in tabPanel , but it doesn't validating the other tabs in the TabPanel control and the save button enables i.e which is not validating correctly.
Suggest me the right way to validate all the controls with in the all the tabpanels also and enabling the save button after all the controls were saved.
Thank you.
Try the following. Based on this link: http://forums.ext.net/showthread.php?27203
<%# Page Language="C#" %>
<%# Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<body>
<form id="form1" runat="server">
<div>
<ext:ResourceManager ID="reso" SourceFormatting="true" runat="server" />
<ext:Panel ID="MainPanel" runat="server" AutoHeight="true" Layout="VBoxLayout" Border="false"
AutoScroll="true">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Left" />
</LayoutConfig>
<Items>
<ext:Panel ID="pnlEditInfo" Header="false" Border="false" runat="server" Title="Basic Info"
Width="950" AutoHeight="true" AutoScroll="true" Layout="Form" ButtonAlign="Center"
Padding="5" MinHeight="550">
<Items>
<ext:FormPanel ID="fpnlCreateStatus" Cls="formBackground" runat="server" BodyCls="formheader"
Padding="5" ButtonAlign="Center" Layout="FormLayout" Frame="false" MonitorValid="true"
Width="850" Border="false">
<Items>
<ext:Container runat="server" ID="ContnOne" Layout="ColumnLayout" Width="700" MinHeight="120">
<Items>
<ext:Container runat="server" Layout="Form" ColumnWidth=".5" ID="ContOneChild">
<Items>
<ext:TextField ID="txtCompanyName" runat="server" FieldLabel="* Company Name" Cls="labelStyle"
AnchorHorizontal="95%" AllowBlank="false" BlankText="Company Name is required"
MaskRe="/[a-zA-Z0-9-. ]/" MaxLength="240" PaddingSpec="8 0 0 0" Width="350" LabelAlign="Right"
LabelWidth="135">
</ext:TextField>
<ext:TextField ID="txtShortName" MaskRe="/[A-Za-z/_/-/ ]/" Cls="labelStyle" MaxLength="25" LabelWidth="135" AllowBlank="false" BlankText="Short Name is required"
LabelAlign="Right" Width="350" runat="server" FieldLabel="* Short Name" AnchorHorizontal="95%" />
<ext:RadioGroup ID="rghasMultipleLoc" LabelWidth="135" LabelAlign="Right" runat="server"
FieldLabel="Has Multiple Locations?" Width="250">
<Items>
<ext:Radio ID="rdMultiLocYes" runat="server" BoxLabel="Yes" Checked="true" />
<ext:Radio ID="rdMultiLocNo" runat="server" BoxLabel="No" />
</Items>
</ext:RadioGroup>
</Items>
</ext:Container>
</Items>
</ext:Container>
<ext:TabPanel ID="tbpnlCompany" runat="server" Plain="true" Width="830" DeferredRender="false"
Border="false">
<Items>
<ext:Panel ID="pnlProfile" runat="server" Title="Profile" Padding="10" Layout="Form"
Border="false" Height="130">
<Items>
<ext:Panel ID="frmCompProfile" Cls="formBackground" runat="server" BodyCls="formheader"
Padding="5" ButtonAlign="Center" Layout="FormLayout" Frame="false" MonitorValid="true"
Width="850" Border="false">
<Items>
<ext:TextArea ID="txtCompanyProfile" LabelAlign="Right" runat="server" FieldLabel="* Company Profile"
LabelWidth="150" Height="100" TabIndex="1" LabelStyle="font-weight: bold;" AllowBlank="false"
Width="500" BlankText="Company Profile is required" MaskRe="[a-zA-Z0-9!##$%^&*().-_ ]"
MaxLength="500" />
</Items>
</ext:Panel>
</Items>
</ext:Panel>
<ext:Panel ID="pnlAddress" runat="server" Title="Address" Padding="10" Layout="Form"
Border="false" Height="130">
<Items>
<ext:Panel ID="frmPanelAddress" Cls="formBackground" runat="server" BodyCls="formheader"
Padding="5" ButtonAlign="Center" Layout="FormLayout" Frame="false" MonitorValid="true"
Width="850" Border="false">
<Items>
<ext:TextField ID="txtAddress1" LabelAlign="Right" runat="server" FieldLabel="* Address1"
TabIndex="2" LabelStyle="font-weight: bold;" AllowBlank="false" Width="500" BlankText="Address1 is required"
MaskRe="[a-zA-Z0-9!##$%^&*().-_ ]" MaxLength="250" />
<ext:Panel ID="Panel1" runat="server" Layout="ColumnLayout" Border="false">
<Items>
<ext:Panel ID="Panel2" runat="server" Layout="ColumnLayout" ColumnWidth=".3" Border="false">
<Items>
<ext:TextField ID="txtCity" MaskRe="[A-Za-z ]" MaxLength="50" LabelAlign="Right"
runat="server" PaddingSpec="0 0 5 0" TabIndex="4" FieldLabel="City" Width="250"
RemoveClearTrigger="true" Cls="labelStyle" AllowBlank="false" BlankText="City Name is required">
</ext:TextField>
<ext:ComboBox ID="cbCountry" LabelAlign="Right" FieldLabel="* Country" LabelStyle="font-weight: bold;"
TabIndex="5" runat="server" Editable="false" DisplayField="CountryName" BlankText="Country is required"
AllowBlank="false" MsgTarget="Side" ValueField="CountryCode" EmptyText="Select"
Resizable="false" SelectOnFocus="true" Width="250">
<Items>
<ext:ListItem Text="India" Value="1">
</ext:ListItem>
<ext:ListItem Text="U.A.E" Value="3">
</ext:ListItem>
</Items>
</ext:ComboBox>
</Items>
</ext:Panel>
<ext:Panel ID="Panel3" runat="server" Layout="ColumnLayout" ColumnWidth=".3" Border="false">
<Items>
<ext:TextField ID="txtZIP" MaskRe="/[0-9]/" MinLength="6" LabelAlign="Right" runat="server"
TabIndex="6" FieldLabel="ZIP Code" Width="250" PaddingSpec="0 0 5 0" />
<ext:ComboBox ID="cbState" LabelAlign="Right" MsgTarget="Side" FieldLabel="* State"
TabIndex="7" AllowBlank="false" LabelStyle="font-weight: bold;" runat="server"
Editable="false" DisplayField="StateName" ValueField="StateCode" BlankText="State is required"
EmptyText="Select" Resizable="false" SelectOnFocus="true" Width="250">
<Items>
<ext:ListItem Text="Andhra Pradesh" Value="1">
</ext:ListItem>
<ext:ListItem Text="Kerala" Value="2">
</ext:ListItem>
<ext:ListItem Text="London" Value="5">
</ext:ListItem>
<ext:ListItem Text="Kentucky" Value="6">
</ext:ListItem>
</Items>
<SelectedItems>
<ext:ListItem Value="1">
</ext:ListItem>
</SelectedItems>
</ext:ComboBox>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
<ext:Panel ID="pnlCommunication" runat="server" Title="Communication" Border="false" TagString="Communication"
Height="130" Padding="10" Layout="Form">
<Items>
<ext:Panel ID="frmPnlCommunication" Cls="formBackground" runat="server" BodyCls="formheader"
Padding="5" ButtonAlign="Center" Layout="FormLayout" Frame="false" MonitorValid="true"
Width="850" Border="false">
<Items>
<ext:TextField ID="txtWebsite" LabelAlign="Right" Regex="/^[A-Za-z0-9-\.]+\.[A-Za-z]{2,4}\/?([^\s<>\#%\,\{\}\\|\\\^\[\]`]+)?$/"
MaxLength="25" InvalidText="Website is invalid" MsgTargetElement="lblErrorMsg" MsgTarget="Side"
runat="server" TabIndex="8" FieldLabel="Website" Width="500" RegexText="Enter Valid Website">
</ext:TextField>
<ext:TextField ID="txtEmailid" LabelAlign="Right" Regex="^(\w+)([-+.][\w]+)*#(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$"
MaxLength="50" TabIndex="9" RegexText="Enter correct emailid" runat="server"
FieldLabel="EmailID" Width="500" />
<ext:TextField ID="txtPhone" LabelAlign="Right" BlankText="Phone is required" runat="server"
TabIndex="10" FieldLabel="Phone" Width="500" MaskRe="/[0-9\-]/" MaxLength="25"
MaxLengthText="Maximum length for phone is 15" />
</Items>
</ext:Panel>
</Items>
</ext:Panel>
</Items>
</ext:TabPanel>
<ext:Panel runat="server" ID="pnlButtons" Height="30" Border="false" Width="600"
ButtonAlign="Center">
<Items>
<ext:Button ID="btnSave" runat="server" Cls="buttonstyle" Icon="Disk" Disabled="true"
Text="Save" TabIndex="24" X="250">
<Listeners>
</Listeners>
</ext:Button>
<ext:Button ID="btnCancel" runat="server" Cls="buttonstyle" Text="Cancel" Icon="Cancel"
X="260" TabIndex="25">
</ext:Button>
</Items>
</ext:Panel>
</Items>
<Listeners>
<ValidityChange Handler="#{btnSave}.setDisabled(!valid);" />
</Listeners>
</ext:FormPanel>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
</div>
</form>
</body>
</html>

Cannot get initial-scale to work for windows phone 7

I have a webbrowser in my winphone 7 app to display a few webpages that contains 2 buttons left and right with a title in the middle, below that a gridview and a few pictures below the gridview.
I tried just about every combination of the following:
<!--meta name="viewport" content="target-densitydpi=device-dpi; width=device-width; initial-scale=0.35; user-scalable=yes" /-->
<!--meta name="mobileoptimized" content="0" /-->
<!--meta name="viewport" content="width=480; initial-scale=5.0; user-scalable=yes;" id="ViewPort" runat="server" />
<!--meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8" /-->
<!--meta name="HandheldFriendly" content="true" /-->
<!--meta name="apple-mobile-web-app-capable" content="yes" /-->
If I use device-width the last few columns in my gridview is off screen, trying to scale it properly with initial-scale does nothing.
If I use a set width, for instance 320 or 640, the gridview becomes to small (smaller then the width of the screen), and initial-scale again does nothing.
Any idea's ?
aspx source added :
<%# Page Language="C#" AutoEventWireup="true" CodeFile="iDetailled.aspx.cs" Inherits="iDetailled" Title="test" EnableEventValidation="false" %>
<%# Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<!--meta name="viewport" content="target-densitydpi=device-dpi; width=device-width; initial-scale=0.35; user-scalable=yes" /-->
<!--meta name="mobileoptimized" content="0" /-->
<meta name="viewport" content="width=device-width, initial-scale=0.9,user-scalable=yes" id="ViewPort" runat="server" />
<!--meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8" /-->
<!--meta name="HandheldFriendly" content="true" /-->
<!--meta name="apple-mobile-web-app-capable" content="yes" /-->
<title></title>
<script type="text/javascript">
function CallMe() { javascript: history.go(-1); }
</script>
</head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"
media="screen"/>
<body class="GradientBackground3" bgcolor="#CFD1D2">
<form id="form1" runat="server" >
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableHistory="True"
onnavigate="ScriptManager1_Navigate">
</asp:ScriptManager>
<div align="center">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:MultiView ID="MultiView1" runat="server"
onactiveviewchanged="MultiView1_ActiveViewChanged" >
<asp:View ID="View1" runat="server">
<br />
<asp:Panel ID="Panel2" runat="server" Width="90%" >
<table align="center" width="100%">
<tr>
<td align="left" >
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/Images/min2.png" Height="48px" onclick="ImageButton1_Click"
Width="48px" />
</td>
<td>
<table align="center" >
<tr align="center">
<td>
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Large" Text="Turnover by day"></asp:Label>
</td>
</tr>
<tr align="center">
<td>
<asp:Label ID="Label4" runat="server" Text="Label"></asp:Label>
</td>
</tr>
</table>
</td>
<td align="right">
<asp:ImageButton ID="ImageButton2" runat="server" Height="48px"
ImageUrl="~/Images/plus2.png" onclick="ImageButton2_Click" Width="48px" />
</td>
</tr>
</table>
</asp:Panel>
<br />
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
CellPadding="4" DataSourceID="SqlDataSourceDag" ForeColor="#333333"
GridLines="Vertical" onrowcreated="GridView2_RowCreated"
onselectedindexchanged="GridView2_SelectedIndexChanged"
onrowdatabound="GridView2_RowDataBound"
EmptyDataText="No data to display" >
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="TYBusinessDate" DataFormatString="{0:dd/MM}"
HeaderText="This Year" ReadOnly="True"
SortExpression="TYBusinessDate">
<HeaderStyle VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
</asp:BoundField>
<asp:BoundField DataField="LYBusinessDate" DataFormatString="{0:dd/MM}"
HeaderText="Last Year" ReadOnly="True"
SortExpression="LYBusinessDate">
<HeaderStyle VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
</asp:BoundField>
<asp:BoundField DataField="Day" HeaderText="Day" ReadOnly="True"
SortExpression="Day">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="TYTurnoverAmt" DataFormatString="{0:F0}"
HeaderText="This Year" ReadOnly="True" SortExpression="TYTurnoverAmt">
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="LYTurnoverAmt" DataFormatString="{0:F0}"
HeaderText="Last Year" ReadOnly="True" SortExpression="LYTurnoverAmt">
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:TemplateField HeaderText="%">
<ItemTemplate>
<asp:Label ID="Label55" runat="server" Text="Label"></asp:Label>
</ItemTemplate>
<HeaderStyle VerticalAlign="Bottom" HorizontalAlign="Right" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:BoundField DataField="TYClients" HeaderText="This Year" ReadOnly="True"
SortExpression="TYClients" >
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="LYClients" HeaderText="Last Year" ReadOnly="True"
SortExpression="LYClients" >
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="ImageButton5" runat="server" ImageUrl="~/Images/arrow.png"
onclick="ImageButton5_Click" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#999999" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>
<br />
<asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSourceDag" BackColor="#CFD1D2" >
<Titles>
<asp:Title Name="Title1" Text="Turnover">
</asp:Title>
</Titles>
<series>
<asp:Series Name="ThisYear" XValueMember="Day" YValueMembers="TYTurnoverAmt" LegendText="Turnover this year">
</asp:Series>
<asp:Series Name="LastYear" XValueMember="Day" YValueMembers="LYTurnoverAmt" LegendText="Turnover last year">
</asp:Series>
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1" Area3DStyle-Enable3D="true" Area3DStyle-IsClustered="true" BackColor="White" >
<AxisY IntervalAutoMode="VariableCount" IntervalType="Number" IntervalOffsetType="Number">
</AxisY>
<Area3DStyle Enable3D="True" IsClustered="True" />
</asp:ChartArea>
</chartareas>
<Legends>
<asp:Legend Docking="Bottom" Name="Legend1" BackColor="#CFD1D2" >
</asp:Legend>
</Legends>
</asp:Chart>
<asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSourceDag" BackColor="#CFD1D2">
<Titles>
<asp:Title Name="Title1" Text="Clients">
</asp:Title>
</Titles>
<series>
<asp:Series ChartType="Line" Legend="Legend1"
Name="ClientTY" XValueMember="Day" YValueMembers="TYClients" BorderWidth="3" LegendText="Clients this year">
</asp:Series>
<asp:Series ChartType="Line" Legend="Legend1"
Name="ClientLY" XValueMember="Day" YValueMembers="LYClients" BorderWidth="3" LegendText="Clients last year">
</asp:Series>
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1" >
<AxisY IntervalAutoMode="VariableCount" IntervalType="Number" IntervalOffsetType="Number">
</AxisY>
<AxisX IsLabelAutoFit="False">
<LabelStyle Angle="-90" />
</AxisX>
</asp:ChartArea>
</chartareas>
<Legends>
<asp:Legend Docking="Bottom" Name="Legend1" BackColor="#CFD1D2">
</asp:Legend>
</Legends>
</asp:Chart>
<br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Back"
Visible="False" />
<br />
<asp:SqlDataSource ID="SqlDataSourceDag" runat="server"
ConnectionString="<%$ ConnectionStrings:OSCConnectionString %>"
SelectCommand="WWWiPhoneAllStoresPerDay" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
</asp:View>
....second view stripped
</asp:MultiView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
The attributes initial-scale, minimum-scale, and maximum-scale are unsupported in WP7. For now, you can only use height, width, and user-scalable. I've found that the blog post Matt linked to has some incorrect/misleading info. See the following for more accurate information: http://msdn.microsoft.com/en-us/library/ff462082%28VS.92%29.aspx
Also, from what I've seen, WP7 needs the separators between attributes to be commas, not semi-colons.
Without being able to see the page you're trying to display it's hard to say for sure but it sounds like you may have something else on the page affecting the display of the grid.
For reference, the viewport options are documented at http://blogs.msdn.com/b/iemobile/archive/2010/11/22/the-ie-mobile-viewport-on-windows-phone-7.aspx
I found the most suitable viewport for mobile windows 7 is:
<meta id="viewport" name="viewport" content="width=${wurfl.getProperty('max_image_width')}; initial-scale=1.0; maximum-scale=1.0"/>

Resources