Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
504 views
I am getting the following error while trying to build my application.

" The type or namespace name 'Script' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)    in   Telerik.Web.UI"

How to solve this error, please help.

Andrey
Telerik team
 answered on 02 Aug 2012
17 answers
262 views

Hello,

I would like to allow the users to select the number of minutes per row of the Scheduler themselves.

I'm trying to reproduce a small part of the Scheduler customization demo page available there:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/customization/defaultcs.aspx

In my very simple example, I only have a drop down list to select the number of minutes and a Scheduler component with no datasource.


Page:
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> 
          
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Panel1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" /> 
          
        <asp:Panel runat="Server" ID="Panel1">  
                Minutes per row:   
                <asp:DropDownList runat="server" ID="MinutesPerRow" AutoPostBack="true">  
                    <asp:ListItem Value="60" Text="60"></asp:ListItem> 
                    <asp:ListItem Value="30" Text="30" Selected="true"></asp:ListItem> 
                    <asp:ListItem Value="15" Text="15"></asp:ListItem> 
                    <asp:ListItem Value="10" Text="10"></asp:ListItem> 
                </asp:DropDownList> 
                         
            <telerik:RadScheduler runat="server" ID="RadScheduler1"   
                 ShowFullTime="true" OverflowBehavior="Expand" 
                 DataKeyField="ID" DataStartField="Start" DataEndField="End" DataSubjectField="Subject" >                 
            </telerik:RadScheduler> 

Code behind:
    protected override void OnPreRender(EventArgs e)  
    {  
        base.OnPreRender(e);  
 
        RadScheduler1.MinutesPerRow = int.Parse(MinutesPerRow.SelectedValue);  
    } 

This example completely failed.
When I select a value in the drop down list the Panel is refreshing but the Scheduler is still displaying the previous selected value.
I have to do a second post back to obtain the correct layout.

Did I forget something?

Thank you for you help.


Peter
Telerik team
 answered on 02 Aug 2012
1 answer
130 views
Hi all,

Do you have ideas, how to align  text in legend, when you have text format like {text} {value}(you can find details 
in attached image)?

This is simple code, how I create and fill values 
foreach(PieChartItem item in PieChartItemCollection)
            {
                ChartSeriesItem chartItem = item.ChartItem;
                chartItem.Label.TextBlock.Text = String.Format
                            (
                                "{0} {1}"
                                , str1
                                , str2
                            );
            }

Please advice.

Thanks,
Pavlo
 
Rosko
Telerik team
 answered on 02 Aug 2012
4 answers
162 views
As i click on the Insert new Row,  the Grid goes into databinding and i just want to disable the databinding to the Edit Template during insert new row, how is it possible ?

Secondly how is it possible that during edit mode it is able to recognize a dataitem to which the textbox is binded to and during add new row command it displays the error  â€˜Telerik.WebControls.GridInsertionObject does not contain a property’ ??

Maria Ilieva
Telerik team
 answered on 02 Aug 2012
3 answers
66 views
Hi,

I am just trying RadSpell for the first time.  So far, I am rather un-impressed by the suggestions that the spellchecker makes.

A basic example is 'teh'.  Everyone knows that this is a typo for 'the'.  Every spellchecker in the land will suggest 'the' as the best replacement.  With RadSpell, 'the' comes up at around TENTH in the list.  The top suggestion is 'tea'.

This is not going to cut it for our end-users.  Is there a way to improve the suggestion tool so that it is more like other spell-checkers?  Or can the tool at least learn from what words have been changed to by other users?

Thanks,

Craig
Craig Wallace
Top achievements
Rank 1
 answered on 02 Aug 2012
7 answers
539 views
I'm using the example provided in Filtering Template Columns to use a RadComboBox as a filter instead of the standard TextBox. I have followed the example and it is working as expected. Now I need to know how to pass a value to the RadComboBox so I can dynamically change its DataSource. The DataSource for the RadComboBox should change depending on the value of a column in the RadGrid. Can I somehow access the DataKeyNames of the parent RadGrid to get this value or is there a property of the GridTemplateColumn that I can set in my code-behind? I'm stumped.

protected override void SetupFilterControls(TableCell cell)
{
    RadComboBox rcBox = new RadComboBox();
    rcBox.ID = this.GetType().Name + "ComboBox";
    rcBox.AutoPostBack = true;
    rcBox.DataTextField = this.DataField;
    rcBox.DataValueField = this.DataField;
    rcBox.SelectedIndexChanged += rcBox_SelectedIndexChanged;
    rcBox.Items.Add(new RadComboBoxItem("Show All", ""));           
    rcBox.DataSource = DataSource; //<-------- I need to change this DataSource depending on what data is in my RadGrid.
                                    //How can I pass a value here from my aspx page
    rcBox.AppendDataBoundItems = true;
    cell.Controls.Add(rcBox);
}
Maria Ilieva
Telerik team
 answered on 02 Aug 2012
4 answers
319 views
Hello Friends
How Can i  dynamic add  item in context menu  and open Context Menu  on Grid row click by javascript .
Princy
Top achievements
Rank 2
 answered on 02 Aug 2012
4 answers
90 views
Hi,

I am using the RadComboBox version 2009.3.1503. I am observing the strange behavior of RadComboBox.

I have the RadComboBox in RadGrid EditItemTemplate whenever user selects the edit option on the grid row the combobox will be available to select values which will load the values on demand and it works well (I have the necessary LoadOnDemand etc., properties set and ItemsRequested event defined to feed the request). I have list of custom object values stored in page viewstate to use in page postbacks (used to bind the grid in NeedDataSource event).

The real problem occurs when user presses "Escape" key twice in the RadComboBox and clicks on Update link button on RadGrid the page postbacks and in the page viewstate our list of custom object values will be wiped out. The viewstate is returning null for this key.

This entire functionality works fine either user selects any value from the RadComboBox or don't select any value at all (custom validation works fine to identify if a value is selected, if not gives proper error message). I tried with and without setting EmptyMessage property for RadComboBox in either case it is same(pressing Escape key twice lead to wipe out the list of custom object values in the page viewstate). I came across a thread where it is discussed that pressing escape key on RadControls resets control values on the page (using form reset method) but this is wiping out the page viewstate itself. I am not sure which is causing this or is this a know issue with Telerik RadComboBox. Your help will be greatly appreciated.

Thanks,
Ravi
Dimitar Terziev
Telerik team
 answered on 02 Aug 2012
3 answers
159 views
Hi team, 
I am dynamically creating a radtooltip within the orgchart template . Everything works fine except if there are any controls inside radtooltip, it is cascading behind the radorgchart node. I have pasted the code below ..  

Issue No 2 : Also is there any way to move the template so that it will attach to the connecting line ?? .. I have attached the image for both the issues ..

C# Code:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using Telerik.Web.UI;
 
namespace Telerik_Tests
{
    public partial class telerikRadOrgTest : System.Web.UI.Page
    {
 
        OrgChartNode objOrgNode;
        OrgChartGroupItem objOrgGroupItem;
 
        protected void Page_Load(object sender, EventArgs e)
        {
            ChartBuilder();
        }
 
        protected DataTable Binddata()
        {
            DataTable dtTbl = new DataTable();
            dtTbl.Columns.Add("Name");
            dtTbl.Columns.Add("Id");
            dtTbl.Columns.Add("ParentId");
 
            DataRow _dr = dtTbl.NewRow();
            _dr["Name"] = "Test1";
            _dr["Id"] = "1";
            _dr["ParentId"] = DBNull.Value;
            dtTbl.Rows.Add(_dr);
 
            _dr = dtTbl.NewRow();
            _dr["Name"] = "Test2";
            _dr["Id"] = "2";
            _dr["ParentId"] = "1";
            dtTbl.Rows.Add(_dr);
 
            _dr = dtTbl.NewRow();
            _dr["Name"] = "Test3";
            _dr["Id"] = "3";
            _dr["ParentId"] = "1";
            dtTbl.Rows.Add(_dr);
 
            _dr = dtTbl.NewRow();
            _dr["Name"] = "Test4";
            _dr["Id"] = "4";
            _dr["ParentId"] = "1";
            dtTbl.Rows.Add(_dr);
 
            return dtTbl;
 
        }
 
 
        protected void ChartBuilder()
        {
 
            DataTable _tbl = Binddata();
 
            foreach (DataRow drObj in _tbl.Rows)
            {
                objOrgNode = new OrgChartNode();
                objOrgGroupItem = new OrgChartGroupItem() { Template = new SampleTemplate() };
                objOrgNode.GroupItems.Add(objOrgGroupItem);               
                RadOrgChart1.Nodes.Add(objOrgNode);
            }
 
 
        }
 
        class SampleTemplate : ITemplate
        {
            public void InstantiateIn(Control container)
            {
                HyperLink hypInitiative = new HyperLink();
                hypInitiative.ID = "Link";
                hypInitiative.Text = "Some Name";
                hypInitiative.NavigateUrl = "#"
 
                RadToolTip rdTooltip = new RadToolTip();
                rdTooltip.HideEvent = ToolTipHideEvent.ManualClose;
                rdTooltip.ShowEvent = ToolTipShowEvent.OnClick;
                rdTooltip.TargetControlID = "Link";
                //rdTooltip.Text = "Some text .. Some text .. Some text .. Some text .. Some text .. Some text .. Some text .. Some text .. Some text .. Some text .. ";             
                rdTooltip.Controls.Add(BindActionsToToolTip());             
                rdTooltip.Width = Unit.Pixel(600);
 
                Table _tbl = new Table();
                TableRow _tblRow = new TableRow();
                TableCell _tblCell = new TableCell();
 
                _tblCell.Controls.Add(hypInitiative);
                _tblCell.Controls.Add(rdTooltip);
                _tblRow.Cells.Add(_tblCell);
                _tbl.Rows.Add(_tblRow);
 
                container.Controls.Add(_tbl);
            }
 
            protected Table BindActionsToToolTip()
            {
                Table tooltipTbl = new Table();
                tooltipTbl.Style.Add("border", "1px solid black");
                TableRow tooltipTr;
                TableCell tooltipTd;
 
                tooltipTr = new TableRow();               
                tooltipTd = new TableCell();
                tooltipTd.Text = "Sample1";
                tooltipTr.Cells.Add(tooltipTd);
                tooltipTd = new TableCell();
                tooltipTd.Text = "Sample2";
                tooltipTr.Cells.Add(tooltipTd);
 
                tooltipTbl.Rows.Add(tooltipTr);
 
                return tooltipTbl;
            }
 
        }
 
    }
}


ASPX Code: 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="telerikRadOrgTest.aspx.cs"
    Inherits="Telerik_Tests.telerikRadOrgTest" %>
 
<%@ Register Namespace="Telerik.Web.UI" Assembly="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">
<head runat="server">
    <title></title>  
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager runat="server" ID="ScriptManager1">
        </asp:ScriptManager>
        <div>
        </div>
        <div>
            <telerik:RadOrgChart runat="server" ID="RadOrgChart1" DataFieldParentID="ParentId" DataFieldID="Id" DataTextField="Name" EnableCollapsing="true"
                Skin="Office2010Blue">
            </telerik:RadOrgChart>
        </div>
    </div>
    </form>
</body>
</html>
Peter Filipov
Telerik team
 answered on 02 Aug 2012
4 answers
876 views
Hi,

I'm new to the Telerik controls so please forgive any obvious questions!

I have a RadGrid that I am printing - this all works fine but my client has asked for their logo to be added to the printout.  After some investigation I found a sample which had a Grid Header with an image displayed and this appeared in the printout.  Trouble is even working through the sample I can't get it to work on my grid.  

Essentially I need to colour the background of the header RED so that it blends in with the rest of the page the grid is on and have a right aligned image in the header.  Simple as that but I just can't get the header to show up.  Any pointers as to how to add a header to the grid?
Andrey
Telerik team
 answered on 02 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?