Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
250 views

We are trying to specify a custom css file for the content area of the RadEditor by setting the radEditor.ContentAreaCssFile property.

 

This causes it to load the appropriate css file into the editor as expected.

 

However, it also loads the css files from the parent pages and it loads them after the ContentAreaCssFile stylesheet file, which means that the ContentAreaCssFile's styles get overridden by the parent page's styles.

 

The resulting Head area looks like this:

 

<head>

 

<link href="/common/css/editor.css" rel="stylesheet" />                     <------------------- ContentAreaCssFile

<link href="/admin/common/css/admin.css" rel="stylesheet" />                <------------------- stylesheet from parent page

<link href="/admin/common/css/contentmanagement.css" rel="stylesheet" />    <------------------- stylesheet from parent page

 

</head>

 

According to the documentation for the RadEditor found here:

 

http://www.telerik.com/help/aspnet-ajax/editor-content-area-appearance-problems.html

 

... we should be able to fix this by setting the CssFiles property to load only the stylesheets we want.

 

However, the editor appears to be ignoring this setting. We've tried setting it in markup and programmatically. Neither worked. It still loads the stylesheets for the parent pages.

 

We're using version 2009.2.701.20 of the Telerik.Web.UI.dll

Di
Top achievements
Rank 2
 answered on 25 Jan 2012
3 answers
105 views
Hi All,

   So I have a grid that I define programmatically and then add to the page via a PlaceHolder control. I set up the data for the view in "DefineGridStructure" stolen liberally from the Telerik example so I have the base structure for the MasterTableView and the detail TableViews which works well. Where I run into trouble is that during the DetailTableDataBind. Depending on the parent row I may add some row specific columns to the detail table that may only exist for that parent row. Basically the grid has groups of people with the Top level having a group comparison so all the columns are the same, The 2nd level has the people which are all part of the group from the parent row, but now may have some columns that are specific to that group. So what I end up with is something like this:

·         Group Name 1       | Column A | Column B | Column C

    • Person 1 | Column A | Column B | Column C | Column D
    • Person 2          | Column A | Column B | Column C | Column D

·         Group Name 2        | Column A | Column B | Column C 

    • Person 3          | Column A | Column B | Column C | Column E | Column D
    • Person 4          | Column A | Column B | Column C | Column E | Column D

 Right now it works great on the initial load but during any postback/callback it removes all the custom columns, which makes sense since I don't define them in the "DefineGrideStructure". With all that said is there a way to override the columns of a detail table for a specific parent row in say like the prerender or a similar event? And is there an example online for this?

Thanks in advance for any pointers

Sean

Sean
Top achievements
Rank 2
 answered on 25 Jan 2012
1 answer
124 views
Hi all,
I'm using raddocks in my application.
Everythinng working fine.
I'm loading the custom controls which contain radgrid in raddock.
My problem is suppose if I have 10 records in radgrid I need to set the height of the docks to exactly for fitting 10 records.
I'm able to do it for the first time of creating dock.
Grid will get refresh for every 15 secs for example.
After refresh dock will be created from state,at the point of time also I'm also I'm trying to set the dock height ,but its not taking.
How to get rid of this problem, Please help me asap. Its urgent.
Here is my code.
private RadDock CreateRadDock(int i)
    {
        RadDock dock = new RadDock();
        dock.DockMode = DockMode.Docked;
        dock.EnableAnimation = true;
        dock.EnableRoundedCorners = true;
        dock.EnableEmbeddedSkins = true;
        dock.TitlebarContainer.BorderColor = System.Drawing.ColorTranslator.FromHtml("#548264");
        dock.TitlebarContainer.HorizontalAlign = HorizontalAlign.Left;
        dock.Resizable = true;
        dock.UniqueName = Guid.NewGuid().ToString();
        dock.ID = string.Format("RadDock{0}", dock.UniqueName);
  
        switch (i)
        {
            case 1:
                dock.ID = "1";
                dock.Tag = "1";
                break;
            case 2:
                dock.ID = "2";
                dock.Tag = "2";
                break;
            case 3:
                dock.ID = "3";
                dock.Tag = "3";
                break;
            case 4:
                dock.ID = "4";
                dock.Tag = "4";
                break;
            case 5:
                dock.ID = "5";
                dock.Tag = "5";
                break;
            case 6:
                dock.ID = "6";
                dock.Tag = "6";
                break;
        }
  
        dock.Width = Unit.Pixel(460);
          
        //assign client-side event handler
        dock.OnClientInitialize = "Dock_OnClientInitialize";
        DockCloseCommand closeCommand = new DockCloseCommand();
        closeCommand.AutoPostBack = true;
        DockExpandCollapseCommand expandCommand = new DockExpandCollapseCommand();
        dock.OnClientCommand = "ClientCommand";
        DockToggleCommand maximizeCommand = new DockToggleCommand();
        maximizeCommand.Name = "Maximize";
        maximizeCommand.Text = "Maximize";
        maximizeCommand.OnClientCommand = "Dock_OnMaximizeCommand";
        maximizeCommand.AlternateText = "Restore";
        maximizeCommand.CssClass = "max";
        maximizeCommand.AlternateCssClass = "min";
        dock.OnClientResizeEnd = "OnresizeEnd";
        dock.ContentContainer.Style.Add(HtmlTextWriterStyle.OverflowX, "hidden");        
        dock.Skin = "Outlook";
        setDockName();
        switch (dock.ID)
        {
            case "1":
                Control widget = LoadControl("~/DashBoard/Controls/AlarmSummaryCtrl.ascx");
                dock.Command += new DockCommandEventHandler(this.Dock1_Command);
                dock.ContentContainer.Controls.Add(widget);
                dock.Title = "Alarm Summary";
                dock.Height = Unit.Pixel(getAlrmDockHeight());
                break;
            case "2":
                widget = LoadControl("~/DashBoard/Controls/ActiveCallsCtrl.ascx");
                dock.Command += new DockCommandEventHandler(this.Dock2_Command);
                dock.Title = "Active Calls";
                dock.ContentContainer.Controls.Add(widget);
                dock.Height = Unit.Pixel(165);
                break;
            case "3":
                widget = LoadControl("~/DashBoard/Controls/PendingCallsCtrl.ascx");
                dock.Command += new DockCommandEventHandler(this.Dock3_Command);
                dock.Title = "Pending Calls";
                dock.ContentContainer.Controls.Add(widget);
                dock.Height = Unit.Pixel(165);
                break;
            case "4":
                widget = LoadControl("~/DashBoard/Controls/CallActivityForConsoleCtrl.ascx");
                dock.Command += new DockCommandEventHandler(this.Dock4_Command);
                dock.Title = consleDocTitle;
                dock.ContentContainer.Controls.Add(widget);
                dock.Height = Unit.Pixel(165);
                break;
            case "5":
                widget = LoadControl("~/DashBoard/Controls/CallActivityForDispatchrCtrl.ascx");
                dock.Command += new DockCommandEventHandler(this.Dock5_Command);
                dock.Title = disptrDocTitle;
                dock.ContentContainer.Controls.Add(widget);
                dock.Height = Unit.Pixel(165);
                break;
            case "6":
                widget = LoadControl("~/DashBoard/Controls/CallActivityForEndPntCtrl.ascx");
                dock.Command += new DockCommandEventHandler(this.Dock6_Command);
                dock.Title = endPntDocTitle;
                dock.ContentContainer.Controls.Add(widget);
                dock.Height = Unit.Pixel(165);
                break;
        }
  
        dock.OnClientDockPositionChanged = "dockPositionChanged";
        dock.Commands.Add(closeCommand);
        dock.Commands.Add(maximizeCommand);
        dock.Commands.Add(expandCommand);
        return dock;
    }
Creating dock from state:
private RadDock CreateRadDockFromState(DockState state)
   {
       RadDock dock = new RadDock();
       dock.EnableAnimation = true;
       dock.DockMode = DockMode.Docked;
       dock.EnableRoundedCorners = true;
       dock.EnableEmbeddedSkins = true;
       dock.TitlebarContainer.BorderColor = System.Drawing.ColorTranslator.FromHtml("#548264");
       dock.UniqueName = state.UniqueName;
       dock.ID = string.Format("RadDock{0}", state.UniqueName);        
       dock.ApplyState(state);
       dock.Resizable = true;
       dock.Skin = "Outlook";
       DockCloseCommand closeCommand = new DockCloseCommand();
       closeCommand.AutoPostBack = true;
       DockExpandCollapseCommand expandCommand = new DockExpandCollapseCommand();
       expandCommand.AutoPostBack = false;
       DockToggleCommand maximizeCommand = new DockToggleCommand();
       maximizeCommand.Name = "Maximize";
       maximizeCommand.Text = "Maximize";
       maximizeCommand.OnClientCommand = "Dock_OnMaximizeCommand";
       maximizeCommand.AlternateText = "Restore";
       maximizeCommand.CssClass = "max";
       maximizeCommand.AlternateCssClass = "min";
       //assign client-side event handler
       dock.OnClientInitialize = "Dock_OnClientInitialize";
       dock.OnClientCommand = "ClientCommand";
       dock.ContentContainer.Style.Add(HtmlTextWriterStyle.OverflowX, "hidden");
       dock.TitlebarContainer.HorizontalAlign = HorizontalAlign.Left;
       dock.OnClientResizeEnd="OnresizeEnd";        
       setDockName();
       dock.ApplyState(state);
       switch (state.Tag)
       {
           case "1":
               Control widget = LoadControl("Controls/AlarmSummaryCtrl.ascx");
               dock.Command += new DockCommandEventHandler(this.Dock1_Command);
               dock.ID = "1";
               dock.Title = "Alarm Summary";
               dock.ContentContainer.Controls.Add(widget);
               dock.Height = Unit.Pixel(getAlrmDockHeight());
               state.Height = Unit.Pixel(getAlrmDockHeight()); 
               break;
           case "2":
               widget = LoadControl("Controls/ActiveCallsCtrl.ascx");
               dock.Command += new DockCommandEventHandler(this.Dock2_Command);
               dock.ID = "2";
               dock.Title = "Active Calls";
               dock.ContentContainer.Controls.Add(widget);
               break;
           case "3":
               widget = LoadControl("Controls/PendingCallsCtrl.ascx");
               dock.Command += new DockCommandEventHandler(this.Dock3_Command);
               dock.ID = "3";
               dock.Title = "Pending Calls";              
               dock.ContentContainer.Controls.Add(widget);                                
               break;
           case "4":
               widget = LoadControl("Controls/CallActivityForConsoleCtrl.ascx");
               dock.Command += new DockCommandEventHandler(this.Dock4_Command);
               dock.ID = "4";
               dock.Title = consleDocTitle;                
               dock.ContentContainer.Controls.Add(widget);
               break;
           case "5":
               widget = LoadControl("Controls/CallActivityForDispatchrCtrl.ascx");
               dock.Command += new DockCommandEventHandler(this.Dock5_Command);
               dock.ID = "5";
               dock.Title = disptrDocTitle;
               dock.ContentContainer.Controls.Add(widget);
               break;
           case "6":
               widget = LoadControl("Controls/CallActivityForEndPntCtrl.ascx");
               dock.Command += new DockCommandEventHandler(this.Dock6_Command);
               dock.ID = "6";
               dock.Title = endPntDocTitle;
               dock.ContentContainer.Controls.Add(widget);
               break;
       }        
       dock.OnClientDockPositionChanged = "dockPositionChanged";
       dock.Commands.Add(closeCommand);
       dock.Commands.Add(maximizeCommand);
       dock.Commands.Add(expandCommand);        
       return dock;
   }
getAlrmDockHeight()  return height.
Pls help me asap.

Slav
Telerik team
 answered on 25 Jan 2012
3 answers
138 views
Greetings,

I need to get the selected date of a RadDateTimePicker within a JS function.

I already tried to get a reply by searching on this board.
What i have so far is this :

var picker = $find("<%= StartDate.ClientID %>");

Then i need to pass this variable by url like this ( first one works perfectly )
Problem : it just displays : [OBJECT][OBJECT] instead of the selectedDate when i get to this aspx page.

window.open("FrequencyByUser.aspx?id=" + this.id + "&Start=" + picker, "fenetre_popup", "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,width=800,height=350"); ;

Thanks a lot for your help
Adigard
Top achievements
Rank 1
 answered on 25 Jan 2012
1 answer
79 views
Hello,

I fill a
treeview with a ObjectDataSource object. It may be that the ObjectDataSource object does not return a record supplies. Should this be the case, then, a node can be displayed. How can I realize something like that?

<telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="LayoutID"
                  DataFieldParentID="ParentID" DataSourceID="ObjectDataSource1"
                  DataTextField="LayoutName" DataValueField="LayoutArt"
                  onnodedatabound="RadTreeView1_NodeDataBound" 
                    Width="100%" oncontextmenuitemclick="RadTreeView1_ContextMenuItemClick">


Hope you can understand me.
  • No record from DataSource - own node to be displayed
  • Records available from DataSource - no separate node


Best regards
Reiner

Bozhidar
Telerik team
 answered on 25 Jan 2012
1 answer
60 views
The issue that I am seeing is when I add another calendar to my scheduler, it does not populate in the advanced form calendar drop down until a total refresh (cntrl + f5) is done on the page.  I can see the resources getting returned when doing a postback refresh from the getResources javascript call.  Is there a way to ensure the edit drop down is refreshed upon a partial post back?  My server side code for the post back is below (The code is not totally optimized yet, as I am just trying to figure out why this is happening).

<telerik:RadScheduler runat="server" ID="rsMySchedule" SelectedView="DayView"
                FirstDayOfWeek="Sunday" LastDayOfWeek="Saturday" Reminders-Enabled="false"
                Skin="Windows7"
                MonthView-VisibleAppointmentsPerDay="10"
                StartEditingInAdvancedForm="false"
                ShowAllDayRow="true"
                EnableDescriptionField="true"
                AppointmentStyleMode="Default"
                EnableExactTimeRendering="true"
                OverflowBehavior="Expand"
                OnClientAppointmentDataBound="rsMySchedule_appointmentsDataBound"
                OnClientResourcesPopulating="rsMySchedule_resourcePopulating"
                OnClientAppointmentsPopulating="rsMySchedule_appointmentsPopulating"
                OnClientRequestFailed = "rs_MySchedule_clientRequestFailed"
                WeekView-UserSelectable="true"
                MultiDayView-UserSelectable="false"
                TimelineView-UserSelectable="false" >
                <AdvancedForm Modal="true" />
                <WebServiceSettings Path="~/Services/SchedulerWebService.asmx" />
                <TimeSlotContextMenuSettings EnableDefault="true" />
                <AppointmentContextMenuSettings EnableDefault="true" />
            </telerik:RadScheduler>

private void InitializeResources()
{
    var resources = GetUserCalendars(CurrentUserID);
    SchedulerWebService oService = new SchedulerWebService();
 
    var rsxTypes = oService.GetResourceTypes(null);
    rsMySchedule.Resources.Clear();
    if (!IsPostBack) rsMySchedule.ResourceTypes.AddRange(rsxTypes);
 
    rsMySchedule.Resources.AddRange(
        resources
            .Select(rsx => new Telerik.Web.UI.Resource(rsx.Type, rsx.Key, rsx.Text))
            .ToList()
            );
}
Ivana
Telerik team
 answered on 25 Jan 2012
3 answers
67 views
Created a theme from Black using the Style Builder.

Everything looks great except for we have a selected row on an Alternate Row that has an AlternateRow Style.

What's happening is it looks like there's a conflict between the Selected Row style and the AlternateRow style, the Selected Row style is never applied to it. I spent 5 hours yesterday working with the .css file for my grid to no avail (I'm not a CSS expert by a long shot so...).

What I did is I created multiple styles using Style Builder and all had the issue in common.

Does anyone know which css needs to be changed/applied.

Any documentation on the css used? I found some but it was for ASP.Net and not ASP.Net Ajax on the Telerik site.

Thanks
Galin
Telerik team
 answered on 25 Jan 2012
1 answer
58 views
I having the same problem explained in this post

http://www.telerik.com/community/forums/aspnet-ajax/grid/need-help-with-grid-scrollbar-and-browser-scrollbar.aspx

I searched the forums looking for the solution, but I can't find anything.

The problem is:
if I use

<ClientSettings>

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

</ClientSettings>

 

 

Then RadGrid shows the vertical/horizontal scrollbars on the RadGrid AND in the BROWSER WINDOW.
If you use the proposed solution on the above post (<body scroll="no" style="overflow: hidden">), then, if the radgrid rows go beyond the browser window size, then the radgrid is cut and you can't scrolldown, because the scrollbar is hidden.

How I can just show the RadGrid scrollbar and not the browser scrollbar at the same time?
Any work around ?

Thanks in advance

Jose


Galin
Telerik team
 answered on 25 Jan 2012
3 answers
173 views
Hi guys,

I'm evaluating the Telerik ASP.NET AJAX library and one issue that's somewhat of a deal breaker is the erratic behavior of the multi column combobox.

The combobox displays the names of people in the following format 'Last name,Firstname'
It works fine until I type a character after the comma. Then I don't get any results in the combobox dropdown.

So when I search for 'SMITH,J' my SQL query brings a few records into the datatable.  But they don't get displayed in the dropdown.

At the bottom of the dropdown, I have displayed the count of records and it shows the correct number there (e.g 3) but no rows appear.

here's some code from my ASPX page
You can view the live page at https://erxrequest.rnahealth.com/newAmos/Customer.aspx
(use the customer search combobox)

<telerik:RadComboBox ID="RadCmb_CustName" AllowCustomText="true" runat="server" Width="289px"
 Height="200px" EmptyMessage="Search for Customer..." EnableLoadOnDemand="true"
 ShowMoreResultsBox="true" EnableVirtualScrolling="true" CloseDropDownOnBlur="true"
 ChangeTextOnKeyBoardNavigation="true" CollapseAnimation-Type="InBack" ExpandAnimation-Type="InBack"
 IsCaseSensitive="true" Filter="Contains" HighlightTemplatedItems="true" OnClientItemsRequested="UpdateItemCountField"
 OnDataBound="RadCmb_CustName_DataBound" OnItemDataBound="RadCmb_CustName_ItemDataBound"
 LoadingMessage="Loading....." DropDownWidth="600px" OpenDropDownOnLoad="false"
ShowWhileLoading="true" ShowToggleImage="true" ShowDropDownOnTextboxClick="false"
 OnItemsRequested="RadCmb_CustName_ItemsRequested">

 <HeaderTemplate>
  <ul>
<li class="col4">Patient</li>
<li class="col1">Facility</li>
 <li class="col2">Room #</li>
<li class="col3">Date of Borth</li>
<li class="col3">Active/Deactive</li>
</ul>
</HeaderTemplate>
<ItemTemplate>
<ul>
<li class="col4">
<%# DataBinder.Eval(Container.DataItem, "CCUSNM") %></li>
<li class="col1">
 <%# DataBinder.Eval(Container.DataItem, "CNHABR") %></li>
<li class="col2">
  <%# DataBinder.Eval(Container.DataItem, "CRMNO") %></li>
 <li class="col3">
 <%# DataBinder.Eval(Container.DataItem, "CBRTHD") %></li>
<li class="col3">
 <%# DataBinder.Eval(Container.DataItem, "CRCDCD") %></li>
</ul>
</ItemTemplate>


Ivana
Telerik team
 answered on 25 Jan 2012
2 answers
701 views
Hi,,
I am using RadListBox, I want to get all values of listbox.
I am tying to use "get_items" method But it is showing foll. error.
Uncaught TypeError: Object [object Object] has no method 'get_items' 
 
ASPX code
<script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
 
 $('#<%=btnViewAssignedSlots.ClientID %>').click(function() {
               var list = $('#<%= rdLstSource.ClientID %>');
                var items = list.get_items();
               var firstItem = items.getItem(0);
                alert(firstItem);
}
 
});
    </script>

<telerik:RadListBox runat="server" ID="rdLstSource" Height="200px" Width="230px"
                        AutoPostBackOnTransfer="false" AllowTransfer="true" TransferToID="rdLstDestination"
                        AllowTransferOnDoubleClick="true" EnableDragAndDrop="true" ButtonSettings-ShowTransferAll="true">
                        <Items>
                            <telerik:RadListBoxItem Text="Sunday" Value="1" />
                            <telerik:RadListBoxItem Text="Monday" Value="2"/>
                            <telerik:RadListBoxItem Text="Tuesday" Value="3"/>
                            <telerik:RadListBoxItem Text="Wednesday" Value="4"/>
                            <telerik:RadListBoxItem Text="Thursday" Value="5"/>
                            <telerik:RadListBoxItem Text="Friday" Value="6"/>
                            <telerik:RadListBoxItem Text="Saturday" Value="7"/>
                        </Items>
                    </telerik:RadListBox>

Please help me to solve.
Bozhidar
Telerik team
 answered on 25 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?