Test/mainsoft/NunitWebResources/CheckBoxList_Bug578770.aspx \
Test/mainsoft/NunitWebResources/EnumConverter_Bug578586.aspx \
Test/mainsoft/NunitWebResources/ButtonColor_Bug325489.aspx \
- Test/mainsoft/NunitWebResources/SqlDataSource_OnInit_Bug572781.aspx
+ Test/mainsoft/NunitWebResources/SqlDataSource_OnInit_Bug572781.aspx \
+ Test/mainsoft/NunitWebResources/FormViewPagerVisibility.aspx
RESX_DIST = resources/TranslationResources.resx
ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
+2010-04-01 Marek Habersack <mhabersack@novell.com>
+
+ * FormView.cs: do not show the pager if PagerSettings.Visible is
+ false. Fixes bug #578863
+
2010-03-29 Marek Habersack <mhabersack@novell.com>
* GridView.cs: main table must be created and added to the
}
}
- bool showPager = AllowPaging && (dataSource.PageCount > 1);
+ PagerSettings pagerSettings = PagerSettings;
+ bool showPager = AllowPaging && pagerSettings.Visible && (dataSource.PageCount > 1);
Controls.Clear ();
table = CreateTable ();
InitializeRow (headerRow);
table.Rows.Add (headerRow);
}
-
- if (showPager && PagerSettings.Position == PagerPosition.Top || PagerSettings.Position == PagerPosition.TopAndBottom) {
+
+ if (showPager && pagerSettings.Position == PagerPosition.Top || pagerSettings.Position == PagerPosition.TopAndBottom) {
topPagerRow = CreateRow (-1, DataControlRowType.Pager, DataControlRowState.Normal);
InitializePager (topPagerRow, dataSource);
table.Rows.Add (topPagerRow);
table.Rows.Add (footerRow);
}
- if (showPager && PagerSettings.Position == PagerPosition.Bottom || PagerSettings.Position == PagerPosition.TopAndBottom) {
+ if (showPager && pagerSettings.Position == PagerPosition.Bottom || pagerSettings.Position == PagerPosition.TopAndBottom) {
bottomPagerRow = CreateRow (0, DataControlRowType.Pager, DataControlRowState.Normal);
InitializePager (bottomPagerRow, dataSource);
table.Rows.Add (bottomPagerRow);
+2010-04-01 Marek Habersack <mhabersack@novell.com>
+
+ * FormViewTest.cs: added test for bug #578863
+
2010-02-19 Marek Habersack <mhabersack@novell.com>
* SqlDataSourceTest.cs: added test for bug #572781
WebTest.CopyResource (GetType (), "FormView.aspx", "FormView.aspx");
WebTest.CopyResource (GetType (), "FormViewTest1.aspx", "FormViewTest1.aspx");
WebTest.CopyResource (GetType (), "FormViewInsertEditDelete.aspx", "FormViewInsertEditDelete.aspx");
+ WebTest.CopyResource (GetType (), "FormViewPagerVisibility.aspx", "FormViewPagerVisibility.aspx");
}
}
+ [Test (Description="Bug #578863")]
+ public void FormView_PagerSettings_Visibility ()
+ {
+ string origHtml = @"<table id=""FormView1"" cellpadding=""3"" cellspacing=""2"" rules=""all"" border=""1"" style=""background-color:#DEBA84;border-color:#DEBA84;border-width:1px;border-style:None;"">
+ <tr style=""background-color:#FFF7E7;color:#8C4510;"">
+ <td colspan=""2"">
+ <span id=""FormView1_Label1"">1</span>
+ </td>
+ </tr>
+ </table>";
+
+ WebTest t = new WebTest ("FormViewPagerVisibility.aspx");
+ string pageHtml = t.Run ();
+ string renderedHtml = HtmlDiff.GetControlFromPageHtml (pageHtml);
+
+ HtmlDiff.AssertAreEqual (origHtml, renderedHtml, "#A1");
+ }
+
[Test]
[Category ("NunitWeb")]
public void FormView_FireEvent_1 ()
--- /dev/null
+<%@ Page Language="C#" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Bug #578863</title>
+ </head>
+ <body>
+ <form id="form1" runat="server">
+ <%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:FormView ID="FormView1" runat="server" AllowPaging="True" BackColor="#DEBA84"
+ BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2"
+ DataSourceID="ObjectDataSource1" GridLines="Both">
+ <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
+ <EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
+ <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
+ <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
+ <ItemTemplate>
+ <asp:Label ID="Label1" runat="server" Text="<%# FormView1.DataItem.ToString() %>"></asp:Label>
+ </ItemTemplate>
+ <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
+ <PagerSettings Visible="false"/>
+ </asp:FormView><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
+ <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
+ DeleteMethod="DeleteList" InsertMethod="InsertList" SelectMethod="GetMyList"
+ TypeName="MonoTests.System.Web.UI.WebControls.TestMyData" UpdateMethod="UpdateList">
+ <DeleteParameters>
+ <asp:Parameter Name="value" Type="Int32" />
+ </DeleteParameters>
+ <InsertParameters>
+ <asp:Parameter Name="value" Type="Int32" />
+ </InsertParameters>
+ <UpdateParameters>
+ <asp:Parameter Name="index" Type="Int32" />
+ <asp:Parameter Name="value" Type="Int32" />
+ </UpdateParameters>
+ </asp:ObjectDataSource>
+ </form>
+ </body>
+</html>