Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
337 views
Hi Team

I am new to the telerik controls. I am using radchart control in my application. I am setting "month" column value as X axis position. the column "month" comes as the numeric value.(1,2 .. 12). I would like to display in the form of Jan, Feb, Mar and so on. Is there any property to do.
Evgenia
Telerik team
 answered on 01 Apr 2011
16 answers
188 views
Dear Telerik,

When I insert an appointment in the TimeLineView, the rowheight automatically expands (new RowHeight = old RowHeight + initial RowHeight I guess). Would it be possible to disable this, or to initially expand less than a full RowHeight, and only expand the rowheight to another full RowHeight when another appointment actually is inserted? The way it happens now, an unnecessary amount of space is being used, which results in me scrolling up and down my browserwindow while it should fit in one screen.
Raghav
Top achievements
Rank 1
 answered on 01 Apr 2011
3 answers
72 views
Hi,

A bit difficult to explain but... Is it possible to somehow add elements/controls into the container displaying the date at the top and also beside the control that switches from day, week, and month view?  

For example: On the week view that happens to have the 4th of the month as a Sunday, "Sun, 4" would have something beside it that calculates the total number of hours of appointments on that same day so that it'll look like this instead "Sun, 4 / 4 hours".  Also, there would be a button, label, whatnot beside the control that switches between day/week/month view that can display total time that week or maybe even a link that pops open a RadWindow.

Thanks in advance!
Peter
Telerik team
 answered on 01 Apr 2011
4 answers
135 views
Maybe I'm blind but I can't seem to find how to set and get ID of Tabs, thus making it much easier and more secure to control selection etc. via code, since using Indexes would most likely break if you reorder the tabs. Surely, there must be such an option? Currently, we are using the PageViewID as a substitute for this (as well as controlling the RadMultiView) but this requires the use of foreach() everywhere...
improwise
Top achievements
Rank 1
Iron
Iron
 answered on 01 Apr 2011
2 answers
153 views
Dear Telerik Team,

I can't get HierarchyLoadMode="ServerOnDemand" to work. Could you please point me a direction where to search for solving the problem ?

Here is my code : the RadGridProgramme contains 1.000 records. It contains Programs. Each Program contains 500 Projects. If I bind everything in the same time, ServerBind, it's very slow. That's why I would like to bind each RadGridProjetNested on ItemExpand command. But it doesn't work. In any of my trials, RadGridProjetNested bind in the first load, then bind another time on ItemExpand command... 

Aspx : 
<%@ Page Language="C#" MasterPageFile="~/Pages/Master/MasterPage.master" AutoEventWireup="true"
    CodeFile="Programme.aspx.cs" Inherits="Pages_Projets_Programme" Title="Programme" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <telerik:RadAjaxManager ID="RessourceManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RessourceManager">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridProgramme" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGridProgramme">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridProgramme" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGridProjetNested">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridProjetNested" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <fieldset>
        <telerik:RadGrid ID="RadGridProgramme" runat="server" AutoGenerateColumns="False"
            DataSourceID="SqlDataSourceProgramme" GridLines="None" ShowFooter="True" AllowSorting="True"
            EnableLinqExpressions="False" OnItemCreated="RadGridProgramme_ItemCreated" OnDataBound="RadGridProgramme_DataBound"
            OnItemCommand="RadGridProgramme_ItemCommand" EnableEmbeddedSkins="false">
            <MasterTableView DataKeyNames="IdProgramme" DataSourceID="SqlDataSourceProgramme"
                ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" HierarchyLoadMode="ServerOnDemand"
                CommandItemDisplay="Top" Name="Master">
                <NestedViewTemplate>
                    <asp:Panel runat="server" ID="InnerContainer" Visible="false" class="PanelTache">
                        <asp:Label ID="IdprogProjet" Font-Bold="true" Font-Italic="true" Text='<%# Eval("IdProgramme") %>'
                            Visible="false" runat="server" />
                        <telerik:RadGrid AllowSorting="False" DataSourceID="ProjectsDataSource" AutoGenerateColumns="False"
                            EnableEmbeddedSkins="false" EnableLinqExpressions="false" GridLines="None" ID="RadGridProjetNested"
                            OnItemCommand="RadGridProjetNested_ItemCommand" OnItemCreated="RadGridProjetNested_ItemCreated"
                            runat="server" ShowFooter="true" OnItemDataBound="RadGridProjetNested_ItemDataBound">
                            <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="false"
                                HierarchyLoadMode="ServerOnDemand" CommandItemDisplay="Top" DataKeyNames="IdProjet"
                                RetrieveAllDataFields="true" AdditionalDataFieldNames="IdProgramme" Name="RadGridProjetNestedMDView">
                                <ParentTableRelation>
                                    <telerik:GridRelationFields DetailKeyField="IdProjet" MasterKeyField="IdProgramme" />
                                </ParentTableRelation>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="Libelle" DefaultInsertValue="" HeaderText="Libellé"
                                        SortExpression="Libelle" UniqueName="Libelle" />
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                        <asp:SqlDataSource ID="ProjectsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:CSSA %>"
                            SelectCommand="LIST_Project" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:SessionParameter Name="IdRequester" SessionField="IdUser" Type="Int32" />
                                <asp:ControlParameter ControlID="IdprogProjet" PropertyName="Text" Type="String"
                                    Name="IdProgrammeParent" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </asp:Panel>
                </NestedViewTemplate>
                <ExpandCollapseColumn Visible="True">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="IdProgramme" DataType="System.Int32" DefaultInsertValue=""
                        HeaderText="IdProgramme" ReadOnly="True" SortExpression="IdProgramme" UniqueName="IdProgramme"
                        Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Libelle" DefaultInsertValue="" HeaderText="Libellé"
                        SortExpression="Libelle" UniqueName="Libelle">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </fieldset>
    <asp:SqlDataSource ID="SqlDataSourceProgramme" runat="server" ConnectionString="<%$ ConnectionStrings:CSSA %>"
        SelectCommand="LIST_Programme" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:SessionParameter Name="idRequester" SessionField="IdUser" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
</asp:Content>

Aspx.cs : 
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
public partial class Pages_Projets_Programme : Page
{
    /// <summary>
    /// Handles the Load event of the Page control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
    /// <summary>
    /// Handles the DataBound event of the RadGridProgramme control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void RadGridProgramme_DataBound(object sender, EventArgs e)
    {
        if (!String.IsNullOrEmpty(SessionObject.IndexItemExpanded))
        {
            foreach (String strIndex in SessionObject.IndexItemExpanded.Split('-'))
            {
                if (!String.IsNullOrEmpty(strIndex))
                {
                    Int32 Index = Convert.ToInt32(strIndex);
                    RadGridProgramme.Items[Index].Expanded = true;
                    RadGridProgramme.Items[Index].ChildItem.FindControl("InnerContainer").Visible = true;
                }
            }
        }
    }
 
    /// <summary>
    /// Display the list of associated projects
    /// </summary>
    /// <param name="source"></param>
    /// <param name="e"></param>
    protected void RadGridProgramme_ItemCommand(object source, GridCommandEventArgs e)
    {
 
        // Multi-Items stays expanded after Rebind()
        if (e.CommandName == RadGrid.ExpandCollapseCommandName)
        {
            if (!e.Item.Expanded)
            {
                SessionObject.IndexItemExpanded += "-" + e.Item.ItemIndexHierarchical;
            }
            else
            {
                if (!String.IsNullOrEmpty(SessionObject.IndexItemExpanded))
                {
                    SessionObject.IndexItemExpanded = SessionObject.IndexItemExpanded.Replace("-" + e.Item.ItemIndexHierarchical, "");
                }
            }
 
            e.Item.Selected = !e.Item.Selected;
            ((GridDataItem)e.Item).ChildItem.FindControl("InnerContainer").Visible =
                !((GridDataItem)e.Item).ChildItem.FindControl("InnerContainer").Visible;
 
        }
 
        if (e.CommandName == RadGrid.PageCommandName)
        {
            SessionObject.IndexItemExpanded = null;
        }
    }
 
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="Telerik.Web.UI.GridItemEventArgs"/> instance containing the event data.</param>
    protected void RadGridProgramme_ItemCreated(object sender, GridItemEventArgs e)
    {
  
    }
 
    /// <summary>
    ///
    /// </summary>
    /// <param name="source"></param>
    /// <param name="e"></param>
    protected void RadGridProjetNested_ItemCommand(object sender, GridCommandEventArgs e)
    {
 
    }
 
    /// <summary>
    /// Handles the ItemCreated event of the RadGridProjetNested control.
    /// ItemCreated is fired before the item is data-bound. Thus no data is still in the cells' text or input controls.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="Telerik.Web.UI.GridItemEventArgs"/> instance containing the event data.</param>
    protected void RadGridProjetNested_ItemCreated(object sender, GridItemEventArgs e)
    {
         
    }
 
    /// <summary>
    /// Handles the ItemDataBound event of the RadGridProjetNested control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="Telerik.Web.UI.GridItemEventArgs"/> instance containing the event data.</param>
    protected void RadGridProjetNested_ItemDataBound(object sender, GridItemEventArgs e)
    {
 
    }
}

I abstracted some logic to make the code more clear but that's it.

Please help I'm stuck !!

S.F.
Sébastien
Top achievements
Rank 2
 answered on 01 Apr 2011
1 answer
105 views
Hi,

We've a perfectly working code migrated (from .Net 3.5 Teleri 2009 Q2) to .Net 4.0 and Telerik 2011.

Almost all functionalites works fine except all the RadWindowManager $create(Telerik.Web.UI.RadWindowManager ..) calls fails
The call fails at a.beginUpdate() in the MicrosoftAjax.js  script line... it says "obeject property or method not supported"

All the RadWindow $create calls are working fine.

Urgent issue, Please help.

Thanks,

Gopi
Svetlina Anati
Telerik team
 answered on 01 Apr 2011
1 answer
83 views
I've search around the forum trying to find a way to navigate a grid only using the keyboard and I have found some solutions, but not all works.
So far I can focus on the grid and navigate between rows and pages, but I need a way to enter sorting and the filtermenu - I can't get the example from the forum with the FocusMenu function to work.

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function FocusMenu(menu, eventArgs) 
            {
                menu.get_items().getItem(0).get_linkElement().focus();
            }
        </script>
    </telerik:RadCodeBlock>    
      
    <telerik:RadGrid ID="RadGridAxOrder" runat="server" 
                     DataSourceID="sdsAxOrderView" 
                     AllowPaging="True" 
                     AllowSorting="True" 
                     AllowFilteringByColumn="True" 
                     GridLines="None" 
                     AutoGenerateColumns="False" 
                     onitemcommand="RadGridAxOrder_ItemCommand" 
                     onprerender="RadGridAxOrder_PreRender">        
        <GroupingSettings CaseSensitive="false" /> 
        <ClientSettings AllowKeyboardNavigation="true" >
            <KeyboardNavigationSettings FocusKey="G" />
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" DataSourceID="sdsAxOrderView">
            <Columns>
                <telerik:GridBoundColumn DataField="ordreNr" 
                    FilterControlAltText="Filter ordreNr column" HeaderText="Ordrenr." 
                    ReadOnly="True" SortExpression="ordreNr" UniqueName="ordreNr">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ordreNavn" 
                    FilterControlAltText="Filter ordreNavn column" HeaderText="Ordrenavn" 
                    SortExpression="ordreNavn" UniqueName="ordreNavn">
                </telerik:GridBoundColumn>
                  
And so on

    protected void RadGridAxOrder_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
    {
        if (e.CommandName == "Edit")
        {
            e.Canceled = true;
        }
    }
  
    protected void RadGridAxOrder_PreRender(object sender, EventArgs e)
    {
        RadGridAxOrder.FilterMenu.OnClientShown = "FocusMenu";
    }
}

Note: I don't want the edit-form to be activated - that's the reason for the ItemCommand-event.

I'm also looking for a way to make the filtermenu focused automatically on page load and making the grid focused automatically when the users navigates to another page in the grid.
Mira
Telerik team
 answered on 01 Apr 2011
41 answers
468 views
I am using RadEditor for SharePoint 5.5.0.0 for a client of ours.

The requirement is to enable embedding flash/youtube videos in to the page content.

I followed the instructions from other threads here on the forum

1) In the ConfigFile.xml

<configuration>
  <property name="AllowScripts">true</property>
  <property name="AllowThumbGeneration">True</property>
  <property name="ConvertToXhtml">True</property>
  <property name="EnableDocking">False</property>
  <property name="ShowHtmlMode">True</property>
  <property name="ShowPreviewMode">False</property>
  <property name="StripAbsoluteAnchorPaths">False</property>
  <property name="StripAbsoluteImagesPaths">False</property>
  <property name="ToolbarMode">ShowOnFocus</property>
  <property name="ToolsWidth">800px</property>
  <property name="NewLineBr">False</property>
  <property name="ImagesPaths">
    <item>SiteCollectionImages</item>
  </property>
</configuration>

2) In the page layout, i have set AllowSpecialTags="true"




radE is the tagprefix for telerik defined on the page header

<%@ Register TagPrefix="radE" Namespace="Telerik.SharePoint.FieldEditor" Assembly="RadEditorSharePoint, Version=5.5.0.0, culture=neutral, PublicKeyToken=1f131a624888eeed" %>


3) When the page is published the render DOESNOT show the videos. When I do a view source, I get





<pre style="display:none" id=RadEditorEncodedTag>PEVNQkVEIHN0eWxlPSJXSURUSD.............

this wraps all the special areas where special tags are placed.

How do I force these to display with proper decoding of tags ?

Can someone help me fix what I am doing wrong ?

Thanks.



Jepoy
Top achievements
Rank 1
 answered on 01 Apr 2011
1 answer
116 views
I would like to know how to implement a dashboard like page that ajaxly load 4 usercontrols (widgets) after the page has loaded in the browser. I would like Rad Loading Panels to be displayed whilst the Content panels are loading.

Could I use javascript document ready and attempt to load the usercontrols into the panels? 

I have used the documentation available here: http://www.telerik.com/help/aspnet-ajax/ajax-load-user-controls.html which is helpful but does not address my concern which is to activate the ajax load on document ready.


Tsvetina
Telerik team
 answered on 01 Apr 2011
3 answers
156 views
Hi,

I am new for telerik charting. i want to display a chart , in which values are binding from DB.  i tried using following code but am facing performance issue - it is very very  slow. can u suggest the needful

Here is the code which i used:
aspx code
<telerik:RadChart ID="RadChart1"  runat="server"  ChartImageFormat="Jpeg"  ChartTitle-Visible="True">
                    <Appearance BarWidthPercent="60"  ></Appearance>
                    <Legend Appearance-Position-AlignedPosition="BottomLeft" Appearance-Location="OutsidePlotArea" >
                            <TextBlock Appearance-Position-AlignedPosition="BottomLeft"></TextBlock>
                    </Legend
                    <ChartTitle TextBlock-Text="Forecast Vs Plan" > </ChartTitle>
           
                    <Series>
                         <telerik:ChartSeries  DataYColumn="Base"  Name="Base">
                                <Appearance  FillStyle-MainColor="#ffff66"  FillStyle-SecondColor="#ffff66" Border-Color="#000000" Border-PenStyle="Solid">
                                </Appearance>
                   </telerik:ChartSeries>
        
                   <telerik:ChartSeries DataYColumn="Plan" Name="Plan">
                             <Appearance  FillStyle-MainColor="#ff0033" FillStyle-SecondColor="#ff0033"  Border-Color="#000000" Border-PenStyle="Solid">
                            </Appearance>
                   </telerik:ChartSeries>
         
                    <telerik:ChartSeries DataYColumn="ForeCast"  Name="ForeCast" >
                            <Appearance   FillStyle-MainColor="#6600cc" FillStyle-SecondColor="#6600cc"  Border-Color="#000000" Border-PenStyle="Solid">
                            </Appearance>
                    </telerik:ChartSeries>
                    </Series>
  
          <PlotArea  Appearance-Position-Y="100"
          <XAxis VisibleValues="Positive">
          <Appearance  MajorGridLines-PenStyle="Solid" MajorGridLines-Color="#000000">
           <TextAppearance AutoTextWrap="True" ></TextAppearance>
          </Appearance>
          </XAxis>
          <YAxis VisibleValues="Positive" >
          <Appearance  MajorGridLines-PenStyle="Solid"  MajorGridLines-Color="#000000"></Appearance>
          </YAxis>
            </PlotArea>
           </telerik:RadChart>
aspx.cs code:
protected void Graph_Load()
   {
       decimal Plan, Base, Fore, max = 0;
       DataSet dsResults = new DataSet();
       dsResults = ForeCastBO.loadForeCast(Setinputvalues());
       DataTable dt_Graph = new DataTable();
       dt_Graph.Columns.Add("Division", typeof(String));
       dt_Graph.Columns.Add("Plan", typeof(String));
       dt_Graph.Columns.Add("Base", typeof(String));
       dt_Graph.Columns.Add("ForeCast", typeof(String));
       if (dsResults.Tables[0].Rows.Count > 0)
       {
           for (int i = 0; i < dsResults.Tables[0].Rows.Count; i++)
           {
               dt_Graph.Rows.Add(dsResults.Tables[0].Rows[i][3].ToString(), Decimal.Round(Convert.ToDecimal(dsResults.Tables[0].Rows[i][2].ToString())),
                                    Decimal.Round(Convert.ToDecimal(dsResults.Tables[0].Rows[i][4].ToString())), Decimal.Round(Convert.ToDecimal(dsResults.Tables[0].Rows[i][5].ToString())));
               Plan = Decimal.Round(Convert.ToDecimal(dsResults.Tables[0].Rows[i][2].ToString()));
               Base = Decimal.Round(Convert.ToDecimal(dsResults.Tables[0].Rows[i][4].ToString()));
               Fore = Decimal.Round(Convert.ToDecimal(dsResults.Tables[0].Rows[i][5].ToString()));
               if (Plan > Base)
                   max = Plan;
               else
                   max = Base;
               if (Fore > max)
                   max = Fore;
           }
           RadChart1.DataSource = dt_Graph;
           RadChart1.PlotArea.XAxis.DataLabelsColumn = dt_Graph.Rows[0].ToString();
           int width;
           width = 120 * (dt_Graph.Rows.Count);
           RadChart1.Width = width;
           RadChart1.Height = 400;
           RadChart1.PlotArea.Appearance.FillStyle.MainColor = System.Drawing.Color.White;
           RadChart1.PlotArea.Appearance.FillStyle.SecondColor = System.Drawing.Color.White;
           RadChart1.PlotArea.YAxis.AutoScale = false;
           RadChart1.PlotArea.YAxis.MaxValue = Convert.ToDouble(max);
           RadChart1.PlotArea.YAxis.ScaleBreaks.MaxCount = 7;
           RadChart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Black;
           RadChart1.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Charting.Styles.Unit.Pixel(100);
           // bind to the datasource
           RadChart1.DataBind();
       }
   }


Thanks,
Harin
Ves
Telerik team
 answered on 01 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?