Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
126 views
We are having trouble using multiple toolbars for RadEditor in our MOSS environment. The ListToolsFile.xml is as follows:

<root>
  <tools name="MainToolbar" enabled="true">
    <tool name="Undo" />
    <tool name="Redo" />
    <tool separator="true" />
    <tool name="Cut" />
    <tool name="Copy" />
    <tool name="Paste" shortcut="CTRL+!" /> 
  </tools>
  <tools name="Formatting" enabled="true">
    <tool name="Bold" />
    <tool name="Italic" />
    <tool name="Underline" />
    <tool separator="true" />
    <tool name="FontName" />
    <tool name="RealFontSize" />
  </tools>
<root>

The problem is that it is only the "Formatting" Tool bar that gets rendered.

\\ Regards
Lini
Telerik team
 answered on 02 Dec 2008
3 answers
145 views
Has anyone else seen a performance decline with 2008.3?  I've benchmarked 2008.3 vs 2008.2 in release mode and I am seeing that 2008.3 takes twice as long.  I've done tests with from 3-20 charts on a page and the results are always twice as long.  The processer load on the web server seems to also increase proportionally.  Any ideas?
Mark Griebling
Top achievements
Rank 1
 answered on 02 Dec 2008
1 answer
191 views
I'm new to AJAX and such, but 5 years of professional .Net forms development experience.

I am trying to get the RAD AJAX controls to show in the toolbox.
Despite trying everything, they still aren't showing.

The only clue is when trying to manually add Telerik.Web.UI.dll to the Choose Toolbox Items list.  I get an error message of, "There was an error loading types from assembly 'C:\Program Giles\Telerik\RadControls for ASPNET AJAX Q3 2008\Bin\Telerik.Web.UI.dll' 'Could not load file or assembly 'System.Web.Extensions, Version 1.0.61025.0, Culture=neutral, PubliKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.'"

When checking the GAC System.WebExtensions are in it for .Net 3.5 twice.

So this is relatively new install of vista ultimate with both VS 2005 and 2008 on the PC.
I installed RadControls from 'RadControls_for_ASP.NET_AJAX_2008_3_1125_trial.exe'.

Please answer soon, deadline is far to close.

Thanks,
Kevin
Vlad
Telerik team
 answered on 02 Dec 2008
4 answers
213 views
I am displaying pivot data in grid as in the example Grid/Examples/Programming/Pivot/DefaultCS.aspx .

Now i want to add ImageButton Control with postback url in the grid header.

Can anyone suggest me a way to do so.

Thanks


Yavor
Telerik team
 answered on 02 Dec 2008
4 answers
307 views
Hello,

I am currently testing out the RADcontrols and specificaly the scheduler at the moment.

I always much rather set my datasources in the code-behind and tried so.

This is what my front code looks like:

  <telerik:RadScheduler runat="server" ID="radAfspraken" 
            Width="900px" Skin="Sunset" EnableEmbeddedSkins="True" SelectedView="DayView" GroupBy="Plaats" GroupingDirection="Horizontal" 
            DayStartTime="08:00:00" DayEndTime="19:00:00" TimeZoneOffset="03:00:00" 
            DataKeyField="ID" DataSubjectField="Omschrijving" 
            DataStartField="Start" DataEndField="Eind" DataRecurrenceField="Herhalingsregel" 
            DataRecurrenceParentKeyField="HerhalingsID">  
              
            <TimelineView UserSelectable="false" /> 
             
        </telerik:RadScheduler> 

and here is my code-behind:

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
        Dim sdsA As SessionDataSource  
        sdsA = New SessionDataSource  
        sdsA.ID = "sdsAfspraak" 
        sdsA.DisplayWarning = False 
        sdsA.PrimaryKeyFields = "ID" 
        sdsA.ProviderName = "System.Data.SqlClient" 
        sdsA.ConnectionString = ConfigurationManager.ConnectionStrings("UrenPortal").ConnectionString  
        sdsA.SelectCommand = "Select ID, omschrijving, start, eind, plaatsID, herhalingsregel, herhalingsID FROM afspraken" 
        sdsA.InsertCommand = "INSERT INTO afspraken (omschrijving, start, eind, PlaatsID, herhalingsregel, herhalingsID) VALUES (@Omschrijving, @Start, @Eind, @PlaatsID, @Herhalingsregel, @HerhalingsID)" 
        sdsA.UpdateCommand = "UPDATE afspraken SET omschrijving = @Omschrijving, start = @Start, eind = @Eind, PlaatsID = @PlaatsID, Herhalingsregel = @Herhalingsregel, HerhalingsID = @HerhalingsID WHERE ID = @ID" 
        sdsA.DeleteCommand = "DELETE FROM afspraken WHERE ID = @ID" 
        sdsA.DeleteParameters.Add(New Parameter("ID", TypeCode.Int32))  
 
        sdsA.UpdateParameters.Add(New Parameter("ID", TypeCode.Int32))  
        sdsA.UpdateParameters.Add(New Parameter("omschrijving", TypeCode.String))  
        sdsA.UpdateParameters.Add(New Parameter("start", TypeCode.DateTime))  
        sdsA.UpdateParameters.Add(New Parameter("eind", TypeCode.DateTime))  
        sdsA.UpdateParameters.Add(New Parameter("plaatsID", TypeCode.Int32))  
        sdsA.UpdateParameters.Add(New Parameter("herhalingsregel", TypeCode.String))  
        sdsA.UpdateParameters.Add(New Parameter("herhalingsID", TypeCode.Int32))  
 
        sdsA.InsertParameters.Add(New Parameter("omschrijving", TypeCode.String))  
        sdsA.InsertParameters.Add(New Parameter("start", TypeCode.DateTime))  
        sdsA.InsertParameters.Add(New Parameter("eind", TypeCode.DateTime))  
        sdsA.InsertParameters.Add(New Parameter("plaatsID", TypeCode.Int32))  
        sdsA.InsertParameters.Add(New Parameter("herhalingsregel", TypeCode.String))  
        sdsA.InsertParameters.Add(New Parameter("herhalingsID", TypeCode.Int32))  
 
        radAfspraken.DataSource = sdsA 
 
        Dim sdsP As SessionDataSource  
        sdsP = New SessionDataSource  
        sdsP.ID = "sdsPlaats" 
        sdsP.DisplayWarning = False 
        sdsP.ConnectionString = ConfigurationManager.ConnectionStrings("UrenPortal").ConnectionString  
        sdsP.ProviderName = "System.Data.SqlClient" 
        sdsP.SelectCommand = "SELECT PlaatsID, Naam FROM plaatsen" 
 
        Dim rtPlaats As New ResourceType  
        rtPlaats.KeyField = "PlaatsID" 
        rtPlaats.Name = "Plaats" 
        rtPlaats.TextField = "Naam" 
        rtPlaats.ForeignKeyField = "PlaatsID" 
        rtPlaats.DataSource = sdsP 
        radAfspraken.ResourceTypes.Add(rtPlaats)  
 
 
    End Sub 


It uses the template from the example shown here:

http://www.telerik.com/demos/aspnet/prometheus/Scheduler/Examples/ResourceGrouping/DefaultCS.aspx

Now I also added the SessionDataSource.cs in my app_code and I have no build errors. Still I am receiving an error in my SessionDataSource.cs:

Object not set to a reference of an object (I get the dutch version so sorry if my translation isn't 100% correct)

The error occurs on line:

181:                return (string) ViewState["SessionKey"] ?? Page.ToString() + "_" + ID;  
 

in SessionDataSource.cs

Any idea what I am doing wrong?

Thanks in advance!
Dimitar Milushev
Telerik team
 answered on 02 Dec 2008
1 answer
246 views

Dear Telerik Team,

Please my problem is how I can set the (SelectedNode.Value) from Client side so it will show the node text in the ComboBox text property.
In code behind I'm retrieving the data from the database and move it to the corresponding controls on the page and everything fine except the ComboBox. It may need passing a value to JavaScript function from code behind which will do the rest of the job. I added a JavaScript function to accomplish that (FindNode) and I added an input field to use it for passing the value (ID=SelectedValue) but it's not working with me or May I did not write it the correct way.

I hope I get your response soon.

Thank you

My User Control ASPX File Code:

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="MenuOptionsTree.ascx.vb" Inherits="TerelikCompoTree.MenuOptionsTree" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<body bottommargin="0" topmargin="0" leftmargin="0" rightmargin="0" dir=rtl>   
 <script type="text/javascript">         
    function comboLoad(sender, eventArgs)
    {
        sender.set_text(sender.get_items().getItem(0).get_value());
    }

    function nodeClicking(sender, args)
    {
        var comboBox = $find("<%= RadComboBox1.ClientID %>");
        var node = args.get_node()
      
        document.getElementById('<%=NodeValue.ClientID%>').value = node.get_value();

        comboBox.set_text(node.get_text());      

        comboBox.trackChanges();
        comboBox.get_items().getItem(0).set_value(node.get_text());
        comboBox.commitChanges();

        comboBox.hideDropDown();
    }

    function FindNode()
    {      
        var comboBox = $find("<%= RadComboBox1.ClientID %>");
        var treevw = comboBox.get_items().getItem(0).findControl("RadTreeView1");          
        var node = treevw.findNodeByValue(SelectedValue.value);
        node.select()
       
        comboBox.set_text(node.get_text());

        comboBox.trackChanges();
        comboBox.get_items().getItem(0).set_value(node.get_text());
        comboBox.commitChanges();
    }
   
    function StopPropagation(e) {        
        if(!e)
        {
            e = window.event;
        }

        e.cancelBubble = true;
    }
    function OnClientDropDownOpenedHandler(sender, eventArgs)
    {
        var tree = sender.get_items().getItem(0).findControl("RadTreeView1");
        var selectedNode = tree.get_selectedNode();
        if (selectedNode)
        {
            selectedNode.scrollIntoView();
        }
    }
  
</script>
<telerik:RadComboBox ID="RadComboBox1"
    Runat="server"
    Height="200px"
    Skin="Sunset"
    Width="348px">
    <ItemTemplate>
      <div ID="TreeDiv" onclick="StopPropagation(event)" dir=rtl>
        <telerik:RadTreeView
         ID="RadTreeView1"
         Runat="server"
         Height="350px"
         Width="100%"
         OnClientNodeClicking="nodeClicking"
         Skin="Sunset">
            <CollapseAnimation Duration="100" Type="OutQuint" />
            <ExpandAnimation Duration="100" />
        </telerik:RadTreeView>
        </div>
    </ItemTemplate>
    <Items>
      <telerik:RadComboBoxItem Text="" />
    </Items>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</telerik:RadComboBox>
<input id="NodeValue" value="0" runat="server" enableviewstate="true" type="hidden" />
<input id="SelectedValue" value="124" runat="server" enableviewstate="true" type="hidden" />
</body>

Thank you

Dimitar Milushev
Telerik team
 answered on 02 Dec 2008
1 answer
215 views
I would like to have template columns that get added programmatically but I have noticed differences in the behavior of columns defined in markup and columns added programmatically. When I click on buttons of columns that are defined in markup, their event handlers fire properly. When I cilck on buttons of columns added programmatically, the button doesn't exist anymore, the event isn't fired, and the column isn't rendered properly after the postback.

I have tried to put together an example where there are two columns in a grid that should be exactly the same except that one is added in markup and one is added in codebehind, and I've put in the NeedDataSource and ColumnCreating handlers to get paging working. To see what I mean click on a button in the first column then click on a button in the second column. Is there some way that I can get the programmatically-added column to maintain its state like the other column?

markup:

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadGridTest.aspx.cs" Inherits="KMI.IncidentWeb.RadGridTest" %> 
<%@ Register TagPrefix="Telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %> 
<!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>Untitled Page</title> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
            <div> 
                <asp:ScriptManager ID="MasterScriptManager" runat="server" /> 
 
<Telerik:RadGrid runat="server" ID="grid" AutoGenerateColumns="false" 
        AllowCustomPaging="true" AllowPaging="true" PageSize="3" VirtualItemCount="8">  
    <MasterTableView> 
        <Columns> 
            <Telerik:GridTemplateColumn> 
                <HeaderTemplate> 
                    <asp:Button runat="server" OnClick="button_Click" /> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Button runat="server" OnClick="button_Click" Text='<%# Eval("Name") %>' CommandArgument='<%# Eval("Id") %>' /> 
                </ItemTemplate> 
            </Telerik:GridTemplateColumn> 
        </Columns> 
    </MasterTableView> 
</Telerik:RadGrid> 
 
            </div> 
        </form> 
    </body> 
</html> 
 

codebehind:

 

using System;  
using System.Linq;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
 
namespace KMI.IncidentWeb  
{  
    /// <summary> 
    /// Simple template to match the template defined declaratively on the page  
    /// </summary> 
    public class Template : ITemplate  
    {  
        public void InstantiateIn(Control container)  
        {  
            // Create a control in the container that has its data binding event handled  
            PlaceHolder placeholderTemplateContent = new PlaceHolder();  
            placeholderTemplateContent.DataBinding += new EventHandler(placeholderTemplateContent_DataBinding);  
            container.Controls.Add(placeholderTemplateContent);  
        }  
 
        protected void placeholderTemplateContent_DataBinding(object sender, EventArgs e)  
        {  
            PlaceHolder placeholderTemplateContent = sender as PlaceHolder;  
 
            object dataItem = DataBinder.GetDataItem(placeholderTemplateContent.NamingContainer);  
 
            Button button = new Button();  
            if (dataItem != null)  
            {  
                button.Text = DataBinder.Eval(dataItem, "Name").ToString();  
                button.CommandArgument = DataBinder.Eval(dataItem, "Id").ToString();  
            }  
            button.Click += new EventHandler(button_Click);  
            placeholderTemplateContent.Controls.Add(button);  
        }  
 
        protected void button_Click(object sender, EventArgs e)  
        {  
            throw new NotImplementedException((sender as Button).CommandArgument);  
        }  
    }  
 
    /// <summary> 
    /// Simple column to match the column defined declaratively on the page  
    /// </summary> 
    public class Column : Telerik.Web.UI.GridTemplateColumn  
    {  
        public Column()  
        {  
            ItemTemplate = new Template();  
            HeaderTemplate = new Template();  
        }  
    }  
 
    public partial class RadGridTest : System.Web.UI.Page  
    {  
        protected override void OnInit(EventArgs e)  
        {  
            base.OnInit(e);  
            grid.NeedDataSource += new Telerik.Web.UI.GridNeedDataSourceEventHandler(grid_NeedDataSource);  
            grid.ColumnCreating += new Telerik.Web.UI.GridColumnCreatingEventHandler(grid_ColumnCreating);  
        }  
 
        protected void grid_ColumnCreating(object sender, Telerik.Web.UI.GridColumnCreatingEventArgs e)  
        {  
            e.Column = new Column();  
        }  
 
        protected void grid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
        {  
            // Mock datasource that has a column of integers and a column of texts  
            grid.DataSource = from int id in new int[] { 0, 1, 2, 3, 4, 5, 6, 7 }  
                where id >= grid.PageSize * grid.CurrentPageIndex && id < grid.PageSize * (grid.CurrentPageIndex + 1)  
                select new { Id = idName = string.Format("The number {0}", id) };  
        }  
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!Page.IsPostBack)  
            {  
                grid.Columns.Add(new Column());  
                grid.Rebind();  
            }  
        }  
 
        protected void button_Click(object sender, EventArgs e)  
        {  
            throw new NotImplementedException("Event handled with argument: " + (sender as Button).CommandArgument);  
        }  
    }  
}  
 

Thanks in advance.

Shinu
Top achievements
Rank 2
 answered on 02 Dec 2008
6 answers
1.4K+ views
how to put a radio button inside Rad grid view’
 and how to restrict the user to select only one entry
Princy
Top achievements
Rank 2
 answered on 02 Dec 2008
2 answers
91 views
I was just wondering if the RadUpload for AJAX uploads files with no postbacks?
Thanks,
Riste
riste bakreski
Top achievements
Rank 1
 answered on 02 Dec 2008
3 answers
230 views
I have a Calculated Grid Column that I am trying to use.  I have in the Expression property "{0}/{1}".  Both fields are of type int, but i want the calculated column to be of type double.  However, when the expression is calculated, the field returns 0.  Any thoughts?

<Columns> 
    <telerik:GridBoundColumn HeaderText="Name" DataField="PlayerName" /> 
    <telerik:GridBoundColumn HeaderText="GP" DataField="GamesPlayed" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridBoundColumn HeaderText="AB" DataField="AtBats" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridBoundColumn HeaderText="R" DataField="Runs" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridBoundColumn HeaderText="H" DataField="Hits" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridBoundColumn HeaderText="2B" DataField="Doubles" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridBoundColumn HeaderText="3B" DataField="Triples" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridBoundColumn HeaderText="HR" DataField="HomeRuns" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridBoundColumn HeaderText="RBI" DataField="RunsBattedIn" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridBoundColumn HeaderText="BB" DataField="Walks" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridBoundColumn HeaderText="HBP" DataField="HitByPitch" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridBoundColumn HeaderText="K" DataField="Strikeouts" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridBoundColumn HeaderText="SB" DataField="StolenBases" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> 
    <telerik:GridCalculatedColumn HeaderText="Avg" DataFields="AtBats,Hits" Expression="{1}/{0}" DataType="System.Double" DataFormatString="{0:N3}" /> 
</Columns> 

thanks in advance for your help.

Tommy Martin
TommyM
Top achievements
Rank 1
 answered on 02 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?