Welcome Guest Search | Active Topics | Sign In | Register

ASP GridView Nested In Multipage PageView Options
Pointeman
Posted: Tuesday, July 28, 2009 11:17:39 AM
Rank: Advanced Member
Groups: Member

Joined: 2/27/2009
Posts: 41
My Gridview has been loading successfully until I placed it inside Multipage/PageView2. What am I doing incorrectly?

[ASP.NET]
<div style="BORDER-RIGHT: #c9c9c9 1px solid; PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; BORDER-LEFT: #c9c9c9 1px solid; WIDTH: 388px; PADDING-TOP: 5px; BORDER-BOTTOM: #c9c9c9 1px solid; HEIGHT: 300px; 5px: ">
<eo:MultiPage runat="server" id="MultiPage1">
<eo:PageView id="PageView1" runat="server">Page 1

</eo:PageView>
<eo:PageView id="Pageview2" runat="server">Page 2
<div style="background-image: url('images/blue-bar-grad.gif'); font-family: Arial, Helvetica, sans-serif;
color: #FFFFFF; font-size: medium; height: 35px;">
&nbsp;&nbsp;Talk Radio Schedule
</div>
<br />
<asp:GridView ID="GridView1" runat="server" Width="100%" AllowPaging="True" PageSize="5"
AutoGenerateColumns="False" Font-Names="Arial" Font-Size="Small" Height="38px"
HorizontalAlign="Center" OnPageIndexChanging="GridView1_PageIndexChanging" PagerSettings-Mode="NextPrevious"
PagerSettings-NextPageText="Next" PagerSettings-PreviousPageText="Back" BorderStyle="None">
<PagerSettings NextPageText="Next" PreviousPageText="Back" />
<Columns>

[Codebehind]
protected void GridView1Bind(string sql)
{
EO.Web.PageView Pageview2 = (EO.Web.PageView)MultiPage1.FindControl("PageView2");
GridView GridView1 = (GridView)PageView2.FindControl("GridView1");

dt = new DataTable();
SqlConnection cn = new SqlConnection(cnPath);
SqlDataAdapter da = new SqlDataAdapter(sql, cn);
cn.Open();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
cn.Close();
}
eo_support
Posted: Tuesday, July 28, 2009 11:26:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Your code looks fine to us. Is there possible for you to isolate the problem into a test page so that we can try it here?

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.