protected void ToggleSelectedState(object sender, EventArgs e) { CheckBox headerCheckBox = (sender as CheckBox); foreach (GridDataItem dataItem in RadGrid1.MasterTableView.Items) { (dataItem.FindControl("CheckBox1") as CheckBox).Checked = headerCheckBox.Checked; dataItem.Selected = headerCheckBox.Checked; } }
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ListViewTest._Default" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <asp:ObjectDataSource ID="m_oDataSource" runat="server" SelectMethod="GetData" EnablePaging="true" StartRowIndexParameterName="iStartRecord" MaximumRowsParameterName="iMaxRecords" SortParameterName="sSortColumns" DataObjectTypeName="System.String" TypeName="ListViewTest._Default" OldValuesParameterFormatString="original_{0}"></asp:ObjectDataSource> <telerik:RadListView runat="server" ID="m_oListView" DataSourceID="m_oDataSource"> <ItemTemplate> <fieldset title="Item"> <asp:Label runat="server" Text="Not Selected" /> </fieldset> </ItemTemplate> <SelectedItemTemplate> <fieldset title="Selected Item"> <asp:Label runat="server" Text="Selected" /> </fieldset> </SelectedItemTemplate> </telerik:RadListView> </asp:Content>
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace ListViewTest { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } public IList<String> GetData(string sSortColumns, int iMaxRecords, int iStartRecord) { IList<String> oList = new List<String>(); for (int i = 0; i < 10; i++) { oList.Add(i.ToString()); } return oList; } } }
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="ListViewTest.SiteMaster" %> <!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" xml:lang="en"> <head runat="server"> <title></title> <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" /> <asp:ContentPlaceHolder ID="HeadContent" runat="server"> </asp:ContentPlaceHolder> </head> <body> <form runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js"> </asp:ScriptReference> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js"> </asp:ScriptReference> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js"> </asp:ScriptReference> </Scripts> </telerik:RadScriptManager> <div class="page"> <div class="header"> <div class="title"> <h1> My ASP.NET Application </h1> </div> <div class="clear hideSkiplink"> <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"> <Items> <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/> </Items> </asp:Menu> </div> </div> <div class="main"> <asp:ContentPlaceHolder ID="MainContent" runat="server"/> </div> <div class="clear"> </div> </div> <div class="footer"> </div> </form> </body> </html>
<?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <appSettings> <add key="webpages:Version" value="1.0.0.0" /> <add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> <add key="Telerik.Skin" value="Windows7" /> </appSettings> <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> </connectionStrings> <system.web> <httpHandlers> <remove verb="*" path="*.asmx"/> <add verb="*" path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Culture=neutral, Version=4.0.0.0, PublicKeyToken=31bf3856ad364e35" validate="false"/> <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" /> </httpHandlers> <compilation debug="true" targetFramework="4.0" /> <authentication mode="Forms"> <forms loginUrl="~/Account/Login.aspx" timeout="2880" /> </authentication> <membership> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> </providers> </membership> <pages> <controls> <add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" /> <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" /> <add tagPrefix="telerik" namespace="Telerik.Charting" assembly="Telerik.Web.UI" /> </controls> </pages> <profile> <providers> <clear/> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/> </providers> </profile> <roleManager enabled="false"> <providers> <clear/> <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" /> <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" /> </providers> </roleManager> </system.web> <system.webServer> <modules runAllManagedModulesForAllRequests="true" /> <validation validateIntegratedModeConfiguration="false" /> <handlers> <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" /> </handlers> </system.webServer> </configuration>
| <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"> |
| <Scripts> |
| <asp:ScriptReference Path="~/Scripts/Common.js" /> |
| <asp:ScriptReference Path="~/Scripts/Uploads.js" /> |
| </Scripts> |
| </asp:ScriptManagerProxy> |
Hi Telerik Team,
When we scroll the scrollable RadMenu by using Mouse wheel (moving downwards) till the end, RadMenu popup height is reducing, Due to this effect, only few items are visible in the top of the menu.
This scrollable RadMenu is working fine in (Telerik.Web.UI (2008)) , but it is not working fine in (Telerik.Web.UI (2011).
Design : Default.aspx
----------------------------
<telerik:RadMenu ID="rmDisplay" runat="server" CausesValidation="False" ClickToOpen="true" >
<Items>
<telerik:RadMenuItem runat="server" Text="Display: Table" Value="Table" PostBack="false" >
<GroupSettings ExpandDirection="Up" Height="100px" OffsetX="0" OffsetY="0" />
<Items>
<telerik:RadMenuItem runat="server" Text="Graph" Value="Table1">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Images" Value="Table2">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Graph" Value="Table1">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Graph" Value="Table1">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Images" Value="Table2">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Graph" Value="Table1">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Graph" Value="Table1">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Images" Value="Table2">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Graph" Value="Table1">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Graph" Value="Table1">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Images" Value="Table2">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Graph" Value="Table1">
</telerik:RadMenuItem>
</Items>
</telerik:RadMenuItem>
</Items>
<DefaultGroupSettings ExpandDirection="Up" />
<CollapseAnimation Duration="200" Type="None" />
</telerik:RadMenu>
---- code ends here ----------------
The code uses the theme file (menu.Agionet.css).
Theme file (menu.agionet.css)
------------------------------------------
/* r.a.d.menu Web 2.0 skin */
.RadMenu_Agionet
{
/*background: #666666 url('Menu/Agionet/img/MenuItemBackground.gif');*/
font: normal 9pt Arial, "Ms Sans Serif", "Ms Serif",sans-serif;
margin: 0;
padding: 0;
z-index:3000;
position: static !important;
}
.RadMenu_Agionet .rmRootGroup
{
/*max-width: 130px;
_width: 130px;*/
}
#Filter1_rmX,
#Filter1_rmX .rmText
{
/*resize X button */
width: 14px !important; /* x */
margin: 0;
padding: 0;
}
.RadMenu_Agionet .rmLink,
.RadMenu_Agionet .rmLink:visited,
.RadMenu_Agionet .rmLink:active
{
text-decoration: none;
color: #004D6B;
background: #FFFFFF url(Menu/Agionet/img/MainItemBackground.gif) repeat-x bottom center;
line-height: 22px;
border: 1px solid #004D6B;
overflow:hidden;
}
.RadMenu_Agionet .rmLink:hover,
.RadMenu_Agionet .rmFocused,
.RadMenu_Agionet .rmExpanded
{
color: #FF991A;
border: 1px solid #FF991A;
background: #FFFFFF url(Menu/Agionet/img/MainItemBackgroundHover.gif) repeat-x bottom center;
cursor: hand;
cursor: pointer;
overflow:hidden
}
.RadMenu_Agionet .rmRootGroup .rmText
{
/* line-height: 22px; */
padding: 0 0 0 5px;
cursor: hand;
cursor:pointer;
background-image:none;
display:block !important; /* x */
width:100% !important; /* x */
}
.RadMenu_Agionet .rmItem
{
width:100% !important; /* x */
}
.RadMenu_Agionet .rmSlide
{
margin-top:-1px;
border: 0;
width: 100% !important;
}
.RadMenu_Agionet .rmGroup
{
border: 1px solid #FF991A;
background: #FFE6C7 url(Menu/Agionet/img/rmGroup_bckgr.gif) repeat-x bottom;
text-align: left;
overflow-x:hidden !important;
overflow-y:auto !important;
}
.RadMenu_Agionet .rmVertical
{
/* IE8 fix --- menu type and effekt */
display: block !important;
width:100% !important;
background-color:#FFC884 !important;
color:#004D6B !important;
}
.RadMenu_Agionet .rmGroup .rmLink
{
background: none;
border: 0px !important;
border-bottom: solid 1px #000000;
width:100% !important; /* x */
}
.RadMenu_Agionet .rmGroup .rmText
{
background: none;
margin-right: 0px !important;
padding-left: 8px;
padding-right: 8px;
color: #004D6B;
_display: inline !important;
border: 0px !important;
width:auto !important;
}
.RadMenu_Agionet .rmLeftImage
{
margin-right: 5px;
/*margin: 2px 5px 2px 0;
padding: 0;*/
border: 1px solid;
border-top-color: #5B5B5B;
border-right-color: #606264;
border-bottom-color: #CCCCCC;
border-left-color: #EFEFEF;
position:relative !important;
padding:0 !important;
margin:0 !important;
}
.RadMenu_Agionet .rmRightItem { padding: 2px 0;}
.RadMenu_Agionet .rmGroup .rmLink:hover,
.RadMenu_Agionet .rmGroup .rmFocused,
.RadMenu_Agionet .rmGroup .rmExpanded
{
background: none;
background-color:#FFC884;
color: #004D6B;
/*border-bottom: solid 1px #d8dde0;*/
}
.RadMenu_Agionet .rmHorizontal .rmExpandBottom,
.RadMenu_Agionet .rmHorizontal .rmExpandTop
{ overflow-x:hidden;
}
.RadMenu_Agionet .rmVertical .rmSeparator .rmText
{
padding-top: 2px;
background: #6788be;
font-size: 1px;
}
/* mozilla only - disabled state */
.RadMenu_Agionet .rmLink.disabled,
.RadMenu_Agionet .rmLink.disabled:hover {
color: #CCCCCC;
border: solid 1px #CCCCCC;
background-color: #FFFFFF;
}
/*right-to-left support*/
.RadMenu_Agionet_rtl,
.RadMenu_Agionet_rtl *
{
text-align:right;
}
.RadMenu_Agionet_rtl .rmRootGroup .rmText
{
padding: 0px;
margin: 0;
}
.RadMenu_Agionet_rtl .rmGroup .rmText
{
margin-left: 0 !important;
}
.RadMenu_Agionet_rtl .rmHorizontal .rmExpandBottom,
.RadMenu_Agionet_rtl .rmHorizontal .rmExpandTop
{
background-position:left center;
}
.RadMenu_Agionet_rtl .rmVertical .rmExpandLeft,
.RadMenu_Agionet_rtl .rmVertical .rmExpandRight
{
background: transparent url('Menu/Agionet/img/invertedGroupImageRTL.gif') no-repeat left center;
}
.RadMenu_Agionet_rtl .rmGroup .rmExpandLeft,
.RadMenu_Agionet_rtl .rmGroup .rmExpandRight
{
background: transparent url('Menu/Agionet/img/groupImageRTL.gif') no-repeat 5px center;
}
.RadMenu_Agionet_rtl .rmVertical .rmLink:hover .rmExpandLeft,
.RadMenu_Agionet_rtl .rmVertical .rmLink:hover .rmExpandRight,
.RadMenu_Agionet_rtl .rmVertical .rmFocused .rmExpandLeft,
.RadMenu_Agionet_rtl .rmVertical .rmFocused .rmExpandRight,
.RadMenu_Agionet_rtl .rmVertical .rmExpanded .rmExpandLeft,
.RadMenu_Agionet_rtl .rmVertical .rmExpanded .rmExpandRight
{
background: transparent url(Menu/Agionet/img/invertedGroupImageRTL.gif) left center no-repeat;
}
.RadMenu_Agionet_rtl .rmGroup .rmLink:hover .rmExpandLeft,
.RadMenu_Agionet_rtl .rmGroup .rmLink:hover .rmExpandRight,
.RadMenu_Agionet_rtl .rmGroup .rmFocused .rmExpandLeft,
.RadMenu_Agionet_rtl .rmGroup .rmFocused .rmExpandRight,
.RadMenu_Agionet_rtl .rmGroup .rmExpanded .rmExpandLeft,
.RadMenu_Agionet_rtl .rmGroup .rmExpanded .rmExpandRight
{
background: transparent url(Menu/Agionet/img/groupImageRTL.gif) 5px center no-repeat;
}
#Filter1_divSecondarySelection { margin-right: 1%}
/*#Control1_Help1_rmLogout .rmText,
#Control1_Help1_rmHelp .rmText */
.RadMenu_Agionet_center
{
text-align:center;
margin: 0 auto;
width: 100px !important;
}
---- code ends here ------------
Please do the needful.
Thanks,
V. Raguraman.
Hi
i am using raddatepicker in ascx page
<radCln:RadDatePicker ID="dtpDateOfBirthDriverDetail" Culture="(Default)" runat="server" Width="170px" EnableTyping="False">
<DateInput Skin="" ReadOnly="True">
</DateInput>
<Calendar runat="server" FastNavigationStep="12">
</Calendar>
<ClientEvents OnDateSelected="Driver_CalculateAge" />
</radCln:RadDatePicker>
and its Culture is updated vai page_load of ascx.cs page
System.Globalization.CultureInfo c = new System.Globalization.CultureInfo(sCulture);
c.DateTimeFormat.CalendarWeekRule = System.Globalization.CalendarWeekRule.FirstFourDayWeek;
c.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Monday;
dtpDateOfBirthDriverDetail.Culture=c;
but its functinality is not working as expected for "week no" or as working in other aspx pages
while it is working fine for aspx pages