2012年3月21日水曜日

RoundedCornerExtender and gridview do not match.

I created a cortrol that works ok except for the rounded corner on the panel that contains a gridview of selectable items.

i know it has to do with the size of the panel but the grid view will be different heights depending on the items returns for that page.

this one has to be a common problem.

Specificly the rounded corner bottom appears in the middle of the gridview.

Thanks!

KES

Hi,

You may specify the panel's height & width programmatically in the databound event of the GridView.


Thank you for responding

I know i can set the panel size and width the question is by how much? some lines wrap and other do not. I am really looking for a way to get the extender to reconize the current size of the panel as dictated by the objects populating it.


What about use percentage to represent the panle's width and height. For instance:

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"></script><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>    </div> <asp:Panel ID="Panel1" runat="server" Height="60%" Width="80%"> <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" Height="100%"> </asp:GridView> <ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" BehaviorID="RoundedCornersBehavior1" BorderColor="blue" TargetControlID="Panel1" Radius="6" Corners="All" /> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString%>" SelectCommand="SELECT [EmployeeID], [LastName], [FirstName], [Title], [TitleOfCourtesy] FROM [Employees]" ProviderName="<%$ ConnectionStrings:NorthwindConnectionString.ProviderName%>"> </asp:SqlDataSource> </asp:Panel> </form></body></html>

0 件のコメント:

コメントを投稿