
Hi,
Iam able to create a summary of appointments in the month view by following thesuggestions in this thread
Iwould like this to happen only in the month view. How to stop it from happeningin the other views?
Thanks
Sabrish
if (item.Cells[j].Text == "Policy Information")
{
....Apply some formatting...if
( e.Item.OwnerTableView.Name == "ClientSchedDetl" )
{
if (e.Item is GridDataItem)
{
int j = 0;
GridDataItem item = e.Item as GridDataItem;
foreach (TableCell cell in item.Cells)
{
if (item != null)
{
if (item.Cells[j].Text == "Policy Information")
{
item[
"Policy Information"].Style["height"] = "20px";
//item["EnglishName"].Style["font-weight"] = "bolder";
//item["Description"].Style["font-size"] = "10px";
//item["OriginalName"].Style["font-family"] = "Arial Unicode MS";
//item["OriginalName"].Style["color"] = "#bbbbbb";
//item["Description"].Style["text-align"] = "center";
cell.Style[
"font-family"] = "Arial Unicode MS";
cell.Style[
"text-align"] = "left";
cell.Style[
"font-size"] = "16px";
cell.Style[
"height"] = "24px";
cell.Style[
"font-weight"] = "bold";
}
else
{
if (j == 0) //Column One (no DataKey entries so 0 is the first visble column) MAKE BOLD
{
cell.Style[
"font-family"] = "Arial Unicode MS";
cell.Style[
"text-align"] = "left";
cell.Style[
"font-size"] = "13px";
cell.Style[
"height"] = "24px";
cell.Style[
"font-weight"] = "bold";
}
else //Columns two and on..Non-Bold
{
cell.Style[
"font-family"] = "Arial Unicode MS";
cell.Style[
"text-align"] = "left";
cell.Style[
"font-size"] = "10px";
cell.Style[
"height"] = "24px";
//cell.Style["font-weight"] = "normal";
}
}
j += 1;
}
}
thanks
Neal
RadPageView? I tried
$find("<%=RadEditor1.ClientID%>"); but it returs null. Is it because its in a
RadPageView which is inside a RadMultiPage, which is inside a RadPane, which is inside a RadSplitter, etc?
I have a reference to the RadPageView that the RadEditor is in obtained with multiPage.get_pageViews().getPageView(x)
Thanks,
Brian
| Webpage error details | |
| User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; MDDR; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) | |
| Timestamp: Wed, 16 Sep 2009 21:39:37 UTC | |
| Message: 'undefined' is null or not an object | |
| Line: 5033 | |
| Char: 2 | |
| Code: 0 | |
| URI: http://as-qa-vm/AIMSNET/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scriptManager_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2009.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3ad2d891f5-3533-469c-b9a2-ac7d16eb23ff%3a874f8ea2%3a24ee1bba%3a19620875%3a33108d14%3abd8f85e4%3ae330518b%3a1e771326%3ac8618e41%3a854aa0a7%3a5a6d9d23 | |
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadAjaxPanelDoesNotWork.aspx.cs" Inherits="WebUI.RadAjaxPanelDoesNotWork" %> | |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" > | |
| <head runat="server"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> | |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> | |
| </telerik:RadScriptManager> | |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> | |
| <AjaxSettings> | |
| <telerik:AjaxSetting AjaxControlID="Column1"> | |
| <UpdatedControls> | |
| <telerik:AjaxUpdatedControl ControlID="Column1" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column2" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column3" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| </UpdatedControls> | |
| </telerik:AjaxSetting> | |
| <telerik:AjaxSetting AjaxControlID="Column2"> | |
| <UpdatedControls> | |
| <telerik:AjaxUpdatedControl ControlID="Column1" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column2" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column3" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| </UpdatedControls> | |
| </telerik:AjaxSetting> | |
| <telerik:AjaxSetting AjaxControlID="Column3"> | |
| <UpdatedControls> | |
| <telerik:AjaxUpdatedControl ControlID="Column1" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column2" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column3" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| </UpdatedControls> | |
| </telerik:AjaxSetting> | |
| </AjaxSettings> | |
| </telerik:RadAjaxManager> | |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" | |
| Skin="Default" MinDisplayTime="500"> | |
| </telerik:RadAjaxLoadingPanel> | |
| <asp:Button ID="btnAdd" OnClick="btnAdd_Click" runat="server" Text="Add Dock"/> | |
| <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> | |
| <telerik:RadDockLayout runat="server" ID="radDockLayout" OnSaveDockLayout="radDockLayout_SaveDockLayout" OnLoadDockLayout="radDockLayout_LoadDockLayout"> | |
| <table style="width:99%;"> | |
| <tr> | |
| <td style="width: 30%;" valign="top" runat="server" Id="tblColumn1"> | |
| <telerik:RadDockZone runat="server" ID="Column1" Orientation="vertical" Style="border: 0px; width: 100%; min-height: 400px; min-width:100px"> | |
| </telerik:RadDockZone> | |
| </td> | |
| <td style="width: 30%;" valign="top" runat="server" Id="tblColumn2"> | |
| <telerik:RadDockZone runat="server" ID="Column2" Orientation="vertical" Style="border: 0px; width: 100%; min-height: 400px; min-width:100px"> | |
| </telerik:RadDockZone> | |
| </td> | |
| <td style="width: 30%;" valign="top" runat="server" Id="tblColumn3"> | |
| <telerik:RadDockZone runat="server" ID="Column3" Orientation="vertical" Style="border: 0px; width: 100%; min-height: 400px; min-width:100px;"> | |
| </telerik:RadDockZone> | |
| </td> | |
| </tr> | |
| </table> | |
| </telerik:RadDockLayout> | |
| </telerik:RadAjaxPanel> | |
| </form> | |
| </body> | |
| </html> | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Threading; | |
| using System.Web.UI; | |
| using System.Web.UI.WebControls; | |
| using Telerik.Web.UI; | |
| namespace WebUI | |
| { | |
| public partial class RadAjaxPanelDoesNotWork : System.Web.UI.Page | |
| { | |
| private IList<DockState> dockStates = new List<DockState>(); | |
| private bool shouldSaveDocks = true; | |
| #region page events | |
| protected void Page_Init(object sender, EventArgs e) | |
| { | |
| LoadDocks(); | |
| } | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| if (!Page.IsPostBack) | |
| { | |
| shouldSaveDocks = false; | |
| } | |
| } | |
| protected void radDockLayout_LoadDockLayout(object sender, DockLayoutEventArgs e) | |
| { | |
| //Populate the event args with the state information. The RadDockLayout control | |
| //will automatically move the docks according that information. | |
| var savedDockStates = GetDockStates(); | |
| foreach (DockState dockState in savedDockStates) | |
| { | |
| e.Positions[dockState.UniqueName] = dockState.DockZoneID; | |
| e.Indices[dockState.UniqueName] = dockState.Index; | |
| } | |
| } | |
| protected void radDockLayout_SaveDockLayout(object sender, DockLayoutEventArgs e) | |
| { | |
| //Save the dock state in the db. This will enable us | |
| // to recreate the dock in the next Page_Init. | |
| if (shouldSaveDocks) | |
| { | |
| List<DockState> dockStatesToSave = ((RadDockLayout)sender).GetRegisteredDocksState(); | |
| SaveDockStates(dockStatesToSave); | |
| } | |
| } | |
| protected void btnAdd_Click(object sender, EventArgs e) | |
| { | |
| RadDock dock = CreateRadDock(); | |
| Column1.Controls.Add(dock); | |
| CreateSaveStateTrigger(dock); | |
| dock.Title = "Sample User Control"; | |
| LoadWidget(dock); | |
| } | |
| #endregion | |
| #region Helper Methods | |
| private void LoadDocks() | |
| { | |
| dockStates = GetDockStates(); | |
| //Recreate the docks in order to ensure their proper operation | |
| foreach (DockState dockState in dockStates) | |
| { | |
| if (dockState.Closed == false) | |
| { | |
| RadDock dock = CreateRadDockFromState(dockState); | |
| //We will just add the RadDock control to the RadDockLayout. | |
| // You could use any other control for that purpose, just ensure | |
| // that it is inside the RadDockLayout control. | |
| // The RadDockLayout control will automatically move the RadDock | |
| // controls to their corresponding zone in the LoadDockLayout | |
| // event (see below). | |
| radDockLayout.Controls.Add(dock); | |
| //We want to save the dock state every time a dock is moved. | |
| CreateSaveStateTrigger(dock); | |
| LoadWidget(dock); | |
| } | |
| } | |
| } | |
| private IList<DockState> GetDockStates() | |
| { | |
| List<DockState> _currentDockStates = (List<DockState>)Session["DockStates"]; | |
| if (Object.Equals(_currentDockStates, null)) | |
| { | |
| _currentDockStates = new List<DockState>(); | |
| Session["DockStates"] = _currentDockStates; | |
| } | |
| return _currentDockStates; | |
| } | |
| private void SaveDockStates(IEnumerable<DockState> dockStatesToSave) | |
| { | |
| Session["DockStates"] = dockStatesToSave; | |
| } | |
| private static RadDock CreateRadDockFromState(DockState state) | |
| { | |
| var dock = new RadDock { DockModeDockMode = DockMode.Docked, EnableAnimation = true, Skin = "Default", ID = string.Format("RadDock{0}", state.UniqueName) }; | |
| dock.ApplyState(state); | |
| //dock.EnableAnimation = false; | |
| dock.Commands.Add(new DockCloseCommand()); | |
| dock.Commands.Add(new DockExpandCollapseCommand()); | |
| return dock; | |
| } | |
| private static RadDock CreateRadDock() | |
| { | |
| var dock = new RadDock { DockModeDockMode = DockMode.Docked, EnableAnimation = true, Skin = "Default", UniqueName = Guid.NewGuid().ToString() }; | |
| dock.ID = string.Format("RadDock{0}", dock.UniqueName); | |
| //dock.EnableAnimation = false; | |
| dock.Commands.Add(new DockCloseCommand()); | |
| dock.Commands.Add(new DockExpandCollapseCommand()); | |
| return dock; | |
| } | |
| private void CreateSaveStateTrigger(RadDock dock) | |
| { | |
| //Ensure that the RadDock control will initiate postback | |
| // when its position changes on the client or any of the commands is clicked. | |
| //Using the trigger we will "ajaxify" that postback. | |
| dock.AutoPostBack = true; | |
| dock.CommandsAutoPostBack = true; | |
| } | |
| private void LoadWidget(RadDock dock) | |
| { | |
| Control widget = LoadControl("~/UserControls/SampleUserControl.ascx"); | |
| dock.ContentContainer.Controls.Add(widget); | |
| } | |
| #endregion | |
| } | |
| } | |
| <telerik:RadTreeView ID="AvailableDataFields_TreeView" runat="server" on OnClientContextMenuItemClicked="ContextMenuClick" OnClientDoubleClick="LinkField"> |
| <ContextMenus> |
| <telerik:RadTreeViewContextMenu runat="server" ID="RadTreeViewContextMenu1" ClickToOpen="True" > |
| <Items> |
| <telerik:RadMenuItem ImageUrl="../../images/Data.gif" Text="Add to Data Tab"></telerik:RadMenuItem> |
| <telerik:RadMenuItem ImageUrl="../../images/Filter.gif" Text="Add to Filter Tab"></telerik:RadMenuItem> |
| <telerik:RadMenuItem ImageUrl="../../images/Sort.gif" Text="Add to Order Tab"></telerik:RadMenuItem> |
| </Items> |
| </telerik:RadTreeViewContextMenu> |
| </ContextMenus> |
| </telerik:RadTreeView> |
| oData = oCmd.ExecuteReader |
| Do While oData.Read |
| Dim oNode As New RadTreeNode |
| sDesc = oData("Description").ToString |
| If sDesc.Length > 50 Then |
| sDescsDesc = sDesc.Substring(0, 49) & "..." |
| End If |
| With oNode |
| .ToolTip = "Alias: " & oData("Alias").ToString & vbCrLf & "Description: " & sDesc |
| .Value = oData("TableID") |
| .ExpandMode = TreeNodeExpandMode.ServerSideCallBack |
| .Text = oData("Alias").ToString |
| End With |
| AvailableDataFields_TreeView.Nodes.Add(oNode) |
| Loop |
| Do While oData.Read |
| Dim oNode As New RadTreeNode |
| With oNode |
| .ToolTip = sTooltip |
| .Text = oData("Alias").ToString |
| .ExpandMode = TreeNodeExpandMode.ClientSide |
| .Value = oData("FieldID") |
| .ContextMenuID = "Report" |
| .CssClass = "TreeInnerNode" |
| .HoveredCssClass = "TreeInnerNodeOver" |
| .EnableContextMenu = True |
| End With |
| e.Node.Nodes.Add(oNode) |
