代码改变世界

开发拾遗 -- MS Controls

2008-08-07 10:11  刘少侠  阅读(295)  评论(1编辑  收藏  举报

微软的东西总是有着各种千奇百怪的问题,不是那么尽善尽美,预知详细,且随我来!


 

1: GridView的布局问题

    问      题在往页面添加数个GridView的时候,有时会出现GridView不换行的怪毛病。

    解决办法: 将关联的GridView的HorizontalAlign属性设为Justify,即可!


 

 

2: TabContainer的缩放问题

    问      题在往Tab页面添加控件,Tab页面的大小固定,不会随着内部控件的大小自适应。

    解决办法: 设置属性<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Width="100%"
                 BorderStyle="None"  ScrollBars="Auto">,即可解决!


 

3: Calendar Extender的问题

    问      题: 本地化、自定义CSS属性

    解决办法:   

                          no                  

                       〈1〉定义CSS属性,链接到源文件中

                      

                       
CSS

 

.MyCalendar .ajax__calendar_container
{
    border: 1px solid #646464;
    background-color: lemonchiffon;
    color: red;
}

.MyCalendar .ajax__calendar_dayname { color: blue;}
.MyCalendar .ajax__calendar_today { border: solid 1px blue; font-weight: bold; color: black; background-color:aliceblue;}
.MyCalendar .ajax__calendar_other .ajax__calendar_day, .MyCalendar .ajax__calendar_other .ajax__calendar_year
{
    color: black;
}
.MyCalendar .ajax__calendar_hover .ajax__calendar_day, .MyCalendar .ajax__calendar_hover .ajax__calendar_month, .MyCalendar .ajax__calendar_hover .ajax__calendar_year
{
    color: blue;
    background-color: #BCD0DE;
    border: solid 1px blue;
}
.MyCalendar .ajax__calendar_active .ajax__calendar_day, .MyCalendar .ajax__calendar_active .ajax__calendar_month, .MyCalendar .ajax__calendar_active .ajax__calendar_year
{
    color: blue;
    font-weight: bold;
}

.MyCalendar  table div
{
    border: solid 1px gold;
    background-color: lemonchiffon;
    Margin-top: 0px;
    Color: Red;
}
.MyCalendar  table td
{
    border: solid 0px gold;
    overflow: visible;
    background-color: lemonchiffon;
    height: 23px;
}
.MyCalendar .ajax__calendar .ajax__calendar_hover .ajax__calendar_today {color:#0066cc;}
.MyCalendar .ajax__calendar {
    position: relative;
    left: 0px !important;
    top: 0px !important;
    visibility: visible;
    display: block;
}
.MyCalendar .ajax__calendar iframe
{
    left: 0px !important;
    top: 0px !important;
}
.MyCalendar .ajax__calendar .ajax__calendar_container
{
        z-index: 9999;
}

                     

 

                      〈2〉定义Calendar及ScriptManager的属性

                       
ScriptManager<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release" EnableScriptLocalization="true"
        EnableScriptGlobalization="true">
    </asp:ScriptManager>

 

                       
Calendar <cc1:CalendarExtender ID="CalendarExtender1" Animated="true" Format="yyyy-MM-dd"
                        TargetControlID="tbStartDate" runat="server" CssClass="MyCalendar" PopupPosition="Right">
                    </cc1:CalendarExtender>