Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
108 views
I have an object type called a CalendarEvent (it's a Linq2SQL object) that I'm trying to use to populate a Telerik Schedule control (2010.2.292.35). But in spite of everything appearing to work in the code, the schedule control still renders as not having any events at all.

My scenario involves the the events being matches between two sports teams. The user enters an abbreviation(s) for their team in a text box (comma delimited) and I display the games matching the team(s) entered. At the moment I only have two records in the database with the same team code, in this case SW600. So I'm just searching for all events that match that team. My Linq2SQL DAL returns two results as expected and all the values are populated correctly as well. I am using the Linq method ToList() to return the collection as a list since every example I can find for the schedule control using generics uses a List.

Here's the pertinent code as far as I can tell.
Public ReadOnly Property TeamsCodes As String()
    Get
        Return txtTeams.Text.Trim().Replace(" ", "").Split(",")
    End Get
End Property
 
Public ReadOnly Property CalendarEvents() As IList(Of CalendarEvent)
    Get
        If _calendarEvents Is Nothing Then
            _calendarEvents = _dataContext.CalendarEvents.Where(Function(g) g.StartDate.Month = DateTime.Now.Month And TeamsCodes.Contains(g.TeamCode)).ToList()
        End If
        Return _calendarEvents
    End Get
End Property
 
Protected Sub btnBuildCalendar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnBuildCalendar.Click
    If (Not String.IsNullOrEmpty(txtTeams.Text)) Then
        rsCalendarEvents.DataSource = CalendarEvents
    End If
End Sub

The aspx code for the control is as follows
<telerik:RadScheduler ID="rsCalendarEvents" runat="server" readonly="true"
    DataKeyField="CalendarEventId" DataSubjectField="EventName" DataDescriptionField="EventDescription"
    DataStartField="StartDate" DataEndField="EndDate" Height="600px">
</telerik:RadScheduler>

Is there something that I'm missing that would explain why this doesn't work for me?
Nick
Top achievements
Rank 1
 answered on 14 Jan 2011
2 answers
83 views
Hi

I have a Country radcombo in a page. I have a anchor link to open a new window where we can a new country.
On close of  the window the newly added country should present in the radcombo and it should be in selected state.
Can you please a small sample to achieve this?

Thanks
Sreedhar Ambati
Jonx
Top achievements
Rank 2
 answered on 14 Jan 2011
1 answer
68 views
I have my grid being bound on the client side and everything is working correctly except when I attempt to sort in IE.  When I click on a column it is performing a postback even though I have args.set_cancel(true) in the OnClientCommand function.  When I run this in either Firefox or Chrome it behaves as expected and does not perform a postback.
Pavlina
Telerik team
 answered on 14 Jan 2011
3 answers
615 views
How to disable AutoPostBack RadComboBox with filter, when an item is selected?
For various reasons can't use AutoPostBack = false.
It has to be through javascript.

Thanks in advance.
Rajkumar Subramaniyam
Top achievements
Rank 1
 answered on 14 Jan 2011
1 answer
83 views
When I export to Excel, I'm finding that there are indents that are automatically created.  If I hit the indent left button twice in Excel, it fixes it. Is there some kind of setting in the RadGrid that is causing this to occur or any way to remove this indentation?  I tried setting the padding to 0 in the CSS but that didn't seem to do it (yes I'm using HTML-based export).  Any other ideas?  I'm new to the export feature and so far it hasn't been nearly as straightforward as I would have hoped.
Daniel
Telerik team
 answered on 14 Jan 2011
4 answers
157 views
Dear Friends,

I am new to Telerik controls.
I have a requirement for powerful scheduler for one of our website.
I came across telerik during my searching.

My requirements suit with your scheduler features.
I started downloading trial version with the below link.

http://www.telerik.com/account/your-products/trial-product-versions/trial-single-download.aspx?pmvid=2372&pid=561

We are using SQL Server and Oracle as our back-end(Our application is developed to use both databases).

I want to test demo application with any of these database.
The demo application is not configured to work with database(just you have given mdf file for sql server), please guide me on configuring the same.

I have gone through scheduler code, it was making use of a session variable to manage appointments. I want to see the real time exposure of the scheduler.
Its very urgent. Once we are done with our side, we will go ahead for purchasing. Please treat this with priority.


Regards,
Madhu BN
madhu.bn@religaretech.com
Tim
Top achievements
Rank 1
 answered on 14 Jan 2011
3 answers
176 views
Hello,

i am havind a rad grid now i want to freeze its columns vertically as well as horizontally but its not getting either way done my aspx code is as follows

 <telerik:RadGrid ID="uxRadGrid" runat="server" Width="750px" Height="100%" AutoGenerateColumns="False" AllowFilteringByColumn="true"
            AllowPaging="true" PageSize="100" AllowSorting="True" EnableEmbeddedSkins="false"
             OnDataBound="uxRadGrid_Databound" OnItemCommand="uxRadGrid_ItemCommand"
            OnNeedDataSource="uxRadGrid_NeedDataSource" OnItemDataBound="uxRadGrid_ItemDataBound" OnItemCreated="uxRadGrid_ItemCreated">
            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"/>
            <GroupingSettings CaseSensitive="false" />
           <ClientSettings>
                <Scrolling AllowScroll="True" SaveScrollPosition="True" UseStaticHeaders="True" FrozenColumnsCount="3" >
                </Scrolling>
            </ClientSettings>
            <MasterTableView TableLayout="Fixed" OverrideDataSourceControlSorting="true" AllowFilteringByColumn="true" >
                <Columns>
                    <telerik:GridTemplateColumn Visible="false" UniqueName="ID">
                        <ItemTemplate>
                            <asp:Label ID="uxId" runat="server" Text='<%#Eval("ProgramID")%>' />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn Groupable="false" HeaderText="#" DataField="RowNum" UniqueName="RowNum" SortExpression="RowNum"
                        HeaderStyle-Width="3%" AutoPostBackOnFilter="true" AllowFiltering="false" />
                    <telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="3%" UniqueName="template">
                           <ItemTemplate><asp:CheckBox ID="uxChk" runat="server" /></ItemTemplate>
                           <HeaderTemplate><asp:CheckBox ID="CheckBoxHeader" runat="server" /></HeaderTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn Groupable="false" HeaderText="Program Name" UniqueName="ProgramName" SortExpression="ProgramName"
                        DataField="ProgramName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="true"
                        HeaderStyle-Width="9%" FilterControlWidth="70%" AndCurrentFilterFunction="Contains">
                        <ItemTemplate ><asp:HyperLink ID="lnkName" runat="server" Text='<%#Eval("ProgramName")%>' /></ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn Groupable="false" HeaderText="Program Code" UniqueName="ProgramCode" SortExpression="ProgramCode"
                        DataField="ProgramCode" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="true"
                        HeaderStyle-Width="9%" FilterControlWidth="70%" AndCurrentFilterFunction="Contains">
                        <ItemTemplate ><asp:HyperLink ID="lnkCode" runat="server" Text='<%#Eval("ProgramCode")%>' /></ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn Groupable="true" HeaderText="Client" DataField="ClientName" UniqueName="ClientName"
                        SortExpression="ClientName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="true"
                        HeaderStyle-Width="6%" FilterControlWidth="50%" AndCurrentFilterFunction="Contains" />
                    <telerik:GridNumericColumn Groupable="true" HeaderText="Incentive Budget" DataField="IncentiveBudget"
                        UniqueName="IncentiveBudget" SortExpression="IncentiveBudget" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo"
                        HeaderStyle-Width="10%" FilterControlWidth="60%" ShowFilterIcon="true" DataFormatString="{0:$###,##0.00}"
                        DataType="System.Double" />
                    <telerik:GridBoundColumn Groupable="true" HeaderText="Primary Goal" DataField="PrimaryGoal" UniqueName="PrimaryGoal"
                        SortExpression="PrimaryGoal" HeaderStyle-Width="8%" FilterControlWidth="50%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="true" AndCurrentFilterFunction="Contains" />
                    <telerik:GridBoundColumn Groupable="true" HeaderText="Secondary Goal" DataField="SecondaryGoal" UniqueName="SecondaryGoal"
                        SortExpression="SecondaryGoal" HeaderStyle-Width="8%" FilterControlWidth="60%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="true" AndCurrentFilterFunction="Contains" />
                    <telerik:GridBoundColumn Groupable="true" HeaderText="Tertiary Goal" DataField="TertiaryGoal" UniqueName="TertiaryGoal"
                        SortExpression="TertiaryGoal" HeaderStyle-Width="8%" FilterControlWidth="60%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="true" AndCurrentFilterFunction="Contains" />
                    <telerik:GridBoundColumn Groupable="true" HeaderText="Program Year" DataField="Year" UniqueName="Year" SortExpression="Year"
                        HeaderStyle-Width="6%" FilterControlWidth="50%" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                        ShowFilterIcon="true" AndCurrentFilterFunction="Contains" />
                    <telerik:GridBoundColumn Groupable="true" HeaderText="Starts On" DataField="StartDate" UniqueName="StartDate"
                        SortExpression="StartDate" HeaderStyle-Width="7%" FilterControlWidth="60%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="true" AndCurrentFilterFunction="Contains" />
                    <telerik:GridBoundColumn Groupable="true" HeaderText="Ends On" DataField="EndDate" UniqueName="EndDate"
                        SortExpression="EndDate" HeaderStyle-Width="6%" FilterControlWidth="50%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="true" AndCurrentFilterFunction="Contains" />
                    <telerik:GridBoundColumn Groupable="true" HeaderText="Region" DataField="RegionName" UniqueName="RegionName"
                        SortExpression="RegionName" HeaderStyle-Width="5%" FilterControlWidth="45%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="true" AndCurrentFilterFunction="Contains" />
                    <telerik:GridBoundColumn Groupable="true" HeaderText="Program Status" DataField="ProgramStatus" UniqueName="ProgramStatus"
                        SortExpression="ProgramStatus" HeaderStyle-Width="8%" FilterControlWidth="55%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="true" AndCurrentFilterFunction="Contains" />
                    <telerik:GridBoundColumn Groupable="true" HeaderText="Status" DataField="StatusName" UniqueName="StatusName"
                        SortExpression="StatusName" HeaderStyle-Width="5%" FilterControlWidth="40%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="true" AndCurrentFilterFunction="Contains" />
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>

please help its very urgent i am searching answer from long time

i have checked this


http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/GeneralFeatures/FrozenColumns/DefaultCS.aspx
Pavlina
Telerik team
 answered on 14 Jan 2011
1 answer
178 views
Our users get this error intermittently but on a fairly regular basis.  However, we can never recreate it ourselves.  It's not limited to any one page.  We're building the toolbar dynamically (ie adding the buttons dynamically), generally in the Page_Init event. 

Can anyone shed any light on why this might be occurring or what I can look for?

(We're using the most recent version which I believe is 2010 Q3 SP1)
Peter
Telerik team
 answered on 14 Jan 2011
1 answer
138 views
Hi. I am new to Telerik controls.. I have just downloaded RadControls for ASP.NET AJAX.
I am working with the RadChart control and based on what I have read I believe that the telrik.charting dll is obsolete. Can you verify that this is so and that all the functionality is included in the Telerik.Web.UI. dll.

I am trying to run through the demos - Speficially 30.6 Server-Side Programming -

ChartSeries chartSerices = New ChartSeries(....)
"Error 1 The type or namespace name 'ChartSeries' could not be found (are you missing a using directive or an assembly reference?)"

Is there another dll I need - or Has this been replaced with something else?

Thank you,

Debby
Debby
Top achievements
Rank 1
 answered on 14 Jan 2011
1 answer
186 views


With my RADEditor I have used the javascript from the thread below:-

Mine is exactly the same problem.

http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-font-name-initial-value-never-gets-set-in-firefox-2.aspx

function OnClientSelectionChange(editor, args)  
{      
    var fontValue = editor.get_document().queryCommandValue("FontName");  
    if (!fontName)  
    {          
        var curValue = $telerik.getCurrentStyle(editor.getSelectedElement(), "fontFamily");  
        if (curValue)  
        {  
            var fontName = editor.getToolByName("FontName");         
            if (fontName)  
            {  
                window.setTimeout(function()  
                {  
                    fontName.updateValue(curValue);  
                }, 0);  
            }  
        }  
    }          
}


I am still facing problem with displaying font name and size. When RadEditor is in "Div" mode, this script works fine, like it would display correct Font name and size  which are Verdana and 14px in my case. but when I use Editor in div mode the "size" drop down acts weird..the one that has values like 1, 2, 3..7 being the biggest size. It just won't change the font size. The font size drop down with values in pixels was working fine though. So this was about div mode. How do I make the size drop down work wen in div mode AND with that script included?  The size was changing alright when I hadn't used that script. What could be wrong ?

Now about Iframe mode:-

When I set ContentAreaMode="iframe" and included the script above as OnClientSelectionChange="OnClientSelectionChange" , it did display the font name and size when I clicked inside the Editor in Forefox BUT it displayed Tahoma and 11 px instead of Verdana and and 14 px . Also when I typed text inside the editor it was Veradana font only and size too was 14 px. Why would it display Tahoma and 11 px? Where is that coming from? Also the Size drop down box (with values 1`, 2, 3..7) works fine when its iframe mode. But the Heading Tags drop down doesnt :( It won't change text size when I selected text and chose Heading2, heading 3, Directory, etc from the drop down.

Below are my two editors in two different modes:-

Editor1(Div mode)

 <telerik:RadEditor ID="Editor1" EnableEmbeddedBaseStylesheet="true" OnClientCommandExecuting="OnClientCommandExecuting"
                            ContentAreaMode="Div" SpellCheckSettings-AjaxUrl="~/Telerik.Web.UI.SpellCheckHandler.axd" DictionaryPath="~/App_Data/RadSpell"

DialogsCssFile="~/Skins/Default/DialogCSS.css" EnableEmbeddedSkins="false"
                            Font-Bold="false" TabIndex="18" Width="100%" ContentFilters="ConvertCharactersToEntities"
                            runat="server" StripFormattingOptions="MSWord,Css,ConvertWordLists,Font" StripFormattingOnPaste="MSWord"
                            ToolbarMode="Default" ToolsFile="~/Skins/FullSetOfTools.xml" Language="en-GB"
                            SpellCheckProvider="EditDistanceProvider" SpellEditDistance="2">
                            <Tools>
                                <telerik:EditorToolGroup>
                                    <telerik:EditorDropDown Name="LineSpacing" Text="Line Spacing" PopupWidth="110" PopupHeight="90">
                                        <telerik:EditorDropDownItem Name="Default" Value="" />
                                        <telerik:EditorDropDownItem Name="Single space" Value="20px" />
                                        <telerik:EditorDropDownItem Name="1.5 Lines" Value="35px" />
                                        <telerik:EditorDropDownItem Name="Double spacing" Value="50px" />
                                    </telerik:EditorDropDown>
                                </telerik:EditorToolGroup>
                            </Tools>
                            <CssFiles>
                                <telerik:EditorCssFile Value="~/css/Radeditor.css" />
                            </CssFiles>
                            <Content>
                            </Content>
                            <ImageManager ViewPaths="~/" UploadPaths="~/" />
                        </telerik:RadEditor>

Editor2(iframe mode)

 <telerik:RadEditor ID="Editor2" EnableEmbeddedBaseStylesheet="true" OnClientCommandExecuting="OnClientCommandExecuting"
                            ContentAreaMode="Iframe" SpellCheckSettings-AjaxUrl="~/Telerik.Web.UI.SpellCheckHandler.axd" DictionaryPath="~/App_Data/RadSpell"

DialogsCssFile="~/Skins/Default/DialogCSS.css" EnableEmbeddedSkins="false"
                            Font-Bold="false" TabIndex="18" Width="100%" ContentFilters="ConvertCharactersToEntities"
                            runat="server" StripFormattingOptions="MSWord,Css,ConvertWordLists,Font" StripFormattingOnPaste="MSWord"
                            ToolbarMode="Default" ToolsFile="~/Skins/FullSetOfTools.xml" Language="en-GB"
                            SpellCheckProvider="EditDistanceProvider" SpellEditDistance="2">
                            <Tools>
                                <telerik:EditorToolGroup>
                                    <telerik:EditorDropDown Name="LineSpacing" Text="Line Spacing" PopupWidth="110" PopupHeight="90">
                                        <telerik:EditorDropDownItem Name="Default" Value="" />
                                        <telerik:EditorDropDownItem Name="Single space" Value="20px" />
                                        <telerik:EditorDropDownItem Name="1.5 Lines" Value="35px" />
                                        <telerik:EditorDropDownItem Name="Double spacing" Value="50px" />
                                    </telerik:EditorDropDown>
                                </telerik:EditorToolGroup>
                            </Tools>
                            <CssFiles>
                                <telerik:EditorCssFile Value="~/css/Radeditor.css" />
                            </CssFiles>
                            <Content>
                            </Content>
                            <ImageManager ViewPaths="~/" UploadPaths="~/" />
                        </telerik:RadEditor>


How do I make the Editor work perfectly and not let Master page's CSS screw it up if that's what the reason is here behind the problems I am facing?

Below is my custom CSS that I am using with the Editors ie Radeditor.css :-

html, body
{
    font-family:Verdana, Arial, Helvetica, sans-serif !important;
    font-size:14px !important;
    font-weight:normal !important;
    margin: 0 !important ;
    padding:0 !important;
    
}
 body
{
    font-family:Verdana, Arial, Helvetica, sans-serif !important;
    font-size:14px !important;
    font-weight:normal !important;
    margin: 0 !important ;
    padding:0 !important;
    
}

h1,h2,h3,h4,h5
{
    color:Black !important;
    background-color:Transparent;
    background-image:none !important;
    font-weight:bold;
    border-bottom:0px !important;
    font-family:Segoe UI,Arial,Sans-serif;
    cursor:default;
    padding-left:0px;
    padding-top:0px;
    font: "Segoe UI",Arial,Sans-serif;
    text-decoration:none;
    }


With Div mode Editor I also included the CSS below on my Page:-

     <style type="text/css">
        #<%=Editor1.ClientID%>_contentDiv
        {
            font-family: Verdana !important;
            font-size: 14px !important;
            font-style:normal !important;
            color:Black;     
        }
       
    </style>

Also Please tell me how do I style Heading tags (H1, H2,...H5) when Editor is in Div mode as well as in Iframe mode? Those are not working correctly. Please check my RadEditor.css custom skin above. I have styles Heading tags in it but its still not working fine. What else is needed to be done? How do i get my master page to not affect Heading tags of the editor at all? What all properties do I need to set in that custom css file for my heading tags so they work perfectly.
Rumen
Telerik team
 answered on 14 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?