mySqlDataAdapter.Fill(mySqlDataTable7)
Session("mySqlDataTable7") = mySqlDataTable7
GridView7.DataSource = mySqlDataTable7
GridView7.DataBind()
Button9.Visible = True
Panel12.Attributes.Add("ScrollBars", "Horizontal")
Panel12.Style.Add("overflow", "scroll")
<asp:Panel ID="Panel12" runat="server" CssClass="panellayout" Style="top: 60px; height: 201px; width: 518px; left: 2px; border: none">
<asp:GridView ID="GridView7" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BorderColor="LightGray" BorderStyle="None" CellSpacing="2" CssClass="gridviewlayout1" EmptyDataText="No Records Found" Font-Size="X-Small" Height="19px" HorizontalAlign="Left" PageSize="5" ShowFooter="True" Style="overflow: hidden;
clip: rect(auto auto auto auto); left: 3px; position: absolute; top: 5px" Width="700px">
<Columns>
<asp:BoundField DataField="job_number" HeaderText="Job" Eession="job_number">
<ItemStyle HorizontalAlign="Left" Width="1%" />
</asp:BoundField>
<asp:BoundField DataField="job_name" HeaderText="Name" SortExpression="job_name">
<ItemStyle HorizontalAlign="Left" Width="25%" />
<ItemStyle HorizontalAlign="Right" Width="5%" />
<FooterStyle HorizontalAlign="Right" Width="5%" />
/Columns>
<HeaderStyle BackColor="#FFC080" Height="25px" />
AlternatingRowStyle BackColor="#FFFFC0" />
<RowStyle Height="20px" Wrap="False" />
<PagerStyle BackColor="#E0E0E0" Height="20px" />
<EmptyDataRowStyle ForeColor="ActiveCaption" Height="20px" />
<FooterStyle BackColor="#FF8080" Height="20px" HorizontalAlign="Right" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
Now I have added UpdatePanel and UpdateProgress to my Gridview and the Panel horizontal scroll does not show and the GridView columns run outside the Panel.
Modified mark up code:
<asp:Panel ID="Panel12" runat="server" CssClass="panellayout" Style="top: 60px; height: 201px; width: 518px; left: 2px; border: none">
<asp:UpdatePanel ID="UpdatePanel99" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList8" EventName="SelectedIndexChanged" />
</Triggers>
<ContentTemplate>
<asp:UpdateProgress ID="UpdateProgress99" runat="server" DynamicLayout="false">
<ProgressTemplate>
<br />
<asp:Image ID="Image01" runat="server" ImageUrl="Icons/ajax-loadergif" />
<asp:Label ID="Label01" runat="server" CssClass="labellayout6" Text="Loading data...."></asp:Label>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:GridView ID="GridView7" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" BorderColor="LightGray" BorderStyle="None" CellSpacing="2"
CssClass="gridviewlayout1" EmptyDataText="No Records Found" Font-Size="X-Small"
Height="19px" HorizontalAlign="Left" PageSize="5" ShowFooter="True" Style="overflow: hidden;
clip: rect(auto auto auto auto); left: 3px; position: absolute; top: 5px" Width="700px">
<Columns>
<asp:BoundField DataField="job_number" HeaderText="Job" SortExpression="job_number">
<ItemStyle HorizontalAlign="Left" Width="1%" />
</asp:BoundField>
<asp:BoundField DataField="job_name" HeaderText="Name" SortExpression="job_name">
<ItemStyle HorizontalAlign="Left" Width="25%" />
<ItemStyle HorizontalAlign="Right" Width="5%" />
<FooterStyle HorizontalAlign="Right" Width="5%" />
/Columns>
<HeaderStyle BackColor="#FFC080" Height="25px" />
<AlternatingRowStyle BackColor="#FFFFC0" />
<RowStyle Height="20px" Wrap="False" />
<PagerStyle BackColor="#E0E0E0" Height="20px" />
<EmptyDataRowStyle ForeColor="ActiveCaption" Height="20px" />
<FooterStyle BackColor="#FF8080" Height="20px" HorizontalAlign="Right" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel> </asp:Panel>
Anyone know how to get around this. I could put the Panel scroll attribute in the mark up code and it works this way, but it does not give the right "touch and feel" when the GridView is empty the first time (I prefer not see the scroll attribute till I have filled the GridView the 1st time).
This post has been edited by snufse: 06 October 2010 - 04:24 PM

New Topic/Question
Reply




MultiQuote




|