Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
149 views
Hello,

We have just purchased the full package of Telerik controls.
Before installing the release versions I've uninstalled all trial versions and made sure that do not appear in the Add/remove list of applications.
After intsalling the release versions, I'm forced to go over each one of the references in all projects and delete and add the references.
After finishing with the previous step all projects compile, but when I try to run a web project I get at runtime "Compiler Error Message: CS0433: The type 'Telerik.Web.UI.RadDateTimePicker' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\Telerik.Web.UI\2008.2.826.20__121fae78165ba3d4\Telerik.Web.UI.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\Telerik.Web.UI\2008.2.723.20__121fae78165ba3d4\Telerik.Web.UI.dll'
"

How do I solve this issue? I'm trying gacutil but it fails.

Tzach.
Steve
Telerik team
 answered on 01 Sep 2008
4 answers
146 views
I am having dificulty to add Rad Controls to Microsoft Expression Blend.
I have downloaded the controls. Are there any instructions on how to  get started.
Thanks
Art
Nikolay
Telerik team
 answered on 01 Sep 2008
7 answers
607 views
Hello,

I think there is a mistake in Prometheus 'Future' documentation for RadWindow methods :
e.g: oWnd.set_Behaviors( Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close )

<%= ... %> are missing around WindowBehaviors

Georgi Tunev
Telerik team
 answered on 01 Sep 2008
3 answers
103 views
Hey all,

I used portions of the following example in the documentation (http://www.telerik.com/community/forums/new-forum-post/b314Z-cgb.aspx) to implement the radspell on my page.  The problem is that the button is located at the bottom of the page and when you clickthe button the position of the Spell Checker renders further down the page. What I want to do is position it towards the top of the page. Is there a simple way of doing this?
 
I have a button :
<input id="btnSpellCheck" type="button" value="Spell Check" onclick="spellCheck();"/>

Javascript:
function spellCheck()
{
var spell = GetRadSpell('<%= RadSpellCheck.ClientID %>');
spell.startSpellCheck();
}

The reason i used the following code up above instead of putting the RadSpell buttontype="pushbutton" is because i wanted the button to be skinned with the Web20 look.

Rumen
Telerik team
 answered on 01 Sep 2008
4 answers
104 views
Hi

I deal to change the css in the select day but dont take the change.

How i can do it?

Thanks

Ruben Herrera.
Ruben
Top achievements
Rank 1
 answered on 01 Sep 2008
3 answers
297 views
Hello,

I am using RadComboBox with EnableLoadOnDemand property set to "True". I am handling ItemsRequested event to add appropriate items in combo box.

The problem is that if item's text contains more than one space between words, spaces are removed. For example, if item contains "Test  Test" text (note 2 spaces between the words), RadComboBox.Text property returns "Test Test" text (1 space). I was able to reproduce this problem in IE 7.0 and Safari 3.1.2 for Windows. FF 3.0 works fine (it returns all spaces).

Please check my code. Select "Test  Test2" item and check how many spaces will be returned (I replace spaces with '.').

Best regards, Oleg.


My configuration
Telerik For ASP.NET AJAX 2008.01.0619.35
Windows XP Pro SP2
Visual Studio 2008
IE 7.0 - Fails
Safari 3.1.2 for Windows - Fails
FF 3.0 - OK


Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server">
    </telerik:RadScriptManager>
    <telerik:RadComboBox ID="RadComboBox1" runat="server" EnableLoadOnDemand="True">
    </telerik:RadComboBox>
    <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
    <br />
    <asp:Label ID="Label1" runat="server"></asp:Label>
    </form>
</body>
</html>


Default.aspx.cs

using System;
using Telerik.Web.UI;

public partial class _Default : System.Web.UI.Page
{
  protected void Page_Load(object sender, EventArgs e)
  {
    RadComboBox1.ItemsRequested += new RadComboBoxItemsRequestedEventHandler(RadComboBox1_ItemsRequested);
  }

  void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
  {
    RadComboBox comboBox = (RadComboBox)sender;

    comboBox.Items.Add(new RadComboBoxItem("Test"));
    comboBox.Items.Add(new RadComboBoxItem("Test Test"));
    comboBox.Items.Add(new RadComboBoxItem("Test  Test2")); // note: 2 spaces

    e.EndOfItems = true;
  }

  protected void Button1_Click(object sender, EventArgs e)
  {
    Label1.Text = RadComboBox1.Text.Replace(" ", ".");
  }
}
Veselin Vasilev
Telerik team
 answered on 01 Sep 2008
1 answer
109 views
Resolved now thanks. XHTML Strict issue i believe.

I have a radScheduler displayed on my page in timeline view (vertical resources, skin =gray) with 10+ lines all working great.
 
I do have a problem with the resource names along the left only appearing when there are APPOINTMENTS on the right. if an appointment is not visible on the right then the resource name doe not appear on the left. How can I get the resource names to ALWAYS appear on the left?

I am using the latest Q2 SP1 control. and with the previous version the same problem existed but in reverse.

Many Thanks
Mark
Veselin Vasilev
Telerik team
 answered on 01 Sep 2008
1 answer
123 views
Hi,

I try with the 3 level sample for hierarchical Insert/delete. I have lost the insert for level 1 and level2, only master allow Insert operations. I have activated Autoinsert methods with no result. I've searched but no solution. Why I'm not able to insert in my tables?
Master :     loc_Ontrip                              poin_id(int auto)  <--Insert OK
level1:        loc_Ontrip_service                 service_id(int auto), point_id(int)
level2:        loc_Ontrip_service_room        room_id(int auto), service_id(int)
I have tested with point_id, service_id at level 1 and 2 as string, with no result.
I have tested with complete queries Insert, Update, Delete methods or simplefied like this post with only select methods for level1, and 2
I use the telerik sample with no modifications !
aspx
 <telerik:RadGrid ID="RadGrid1" DataSourceID="SessionDataSource1" runat="server" Skin="Telerik" ShowStatusBar="true" 
            Width="95%" AutoGenerateColumns="False" PageSize="3" AllowSorting="True" AllowMultiRowSelection="False" 
            AllowPaging="True" GridLines="None" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" 
            OnItemUpdated="RadGrid1_ItemUpdated" OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted" OnInsertCommand="RadGrid1_InsertCommand">  
            <PagerStyle Mode="NumericPages"></PagerStyle> 
              
            <MasterTableView DataSourceID="SessionDataSource1" DataKeyNames="point_id" AllowMultiColumnSorting="True" 
                Width="100%" CommandItemDisplay="Top" Name="Hotel">  
                <DetailTables> 
                    <%--level2 Services--%> 
                    <telerik:GridTableView DataKeyNames="service_id" DataSourceID="SessionDataSource2" Width="100%" 
                        runat="server" CommandItemDisplay="Top" Name="Services" AllowAutomaticInserts="true">  
                        <ParentTableRelation> 
                            <telerik:GridRelationFields DetailKeyField="point_id" MasterKeyField="point_id" /> 
                        </ParentTableRelation> 
                        <DetailTables> 
                            <%--level3 Rooms --%> 
                            <telerik:GridTableView DataKeyNames="room_id" DataSourceID="SessionDataSource3" Width="100%" 
                                runat="server" CommandItemDisplay="Top" Name="Rooms" AllowAutomaticInserts="true" > 
                                <ParentTableRelation> 
                                    <telerik:GridRelationFields DetailKeyField="service_id" MasterKeyField="service_id" /> 
                                </ParentTableRelation> 
                                <Columns> 
                                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1">  
                                        <HeaderStyle Width="20px" /> 
                                        <ItemStyle CssClass="MyImageButton" /> 
                                    </telerik:GridEditCommandColumn> 
                                    <telerik:GridBoundColumn SortExpression="room_id" HeaderText="Rooms" HeaderButtonType="TextButton" 
                                        DataField="room_id" UniqueName="room_id" ReadOnly="true" Visible="false">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn SortExpression="Price" HeaderText="UPrice" HeaderButtonType="TextButton" 
                                        DataField="Price" UniqueName="Price">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn SortExpression="PriceWE" HeaderText="PriceWE" HeaderButtonType="TextButton" 
                                        DataField="PriceWE" UniqueName="PriceWE">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn SortExpression="Discount" HeaderText="Discount" HeaderButtonType="TextButton" 
                                        DataField="Discount" UniqueName="Discount">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridButtonColumn ConfirmText="Delete this room?" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn1">  
                                        <HeaderStyle Width="20px" /> 
                                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                                    </telerik:GridButtonColumn> 
                                </Columns> 
                                <SortExpressions> 
                                    <telerik:GridSortExpression FieldName="PriceWE" SortOrder="Descending"></telerik:GridSortExpression> 
                                </SortExpressions> 
                             </telerik:GridTableView> 
                        </DetailTables> 
                        <Columns> 
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn2">  
                                <HeaderStyle Width="20px" /> 
                                <ItemStyle CssClass="MyImageButton" /> 
                            </telerik:GridEditCommandColumn> 
                            <telerik:GridBoundColumn SortExpression="service_id" HeaderText="service_id" HeaderButtonType="TextButton" 
                                DataField="service_id" UniqueName="service_id" ReadOnly="true">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn SortExpression="service_name" HeaderText="Service" HeaderButtonType="TextButton" 
                                DataField="service_name" UniqueName="service_name" ReadOnly="true">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridButtonColumn ConfirmText="Delete this service?" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn2">  
                                <HeaderStyle Width="20px" /> 
                                <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                            </telerik:GridButtonColumn> 
                        </Columns> 
                        <SortExpressions> 
                            <telerik:GridSortExpression FieldName="service_name"></telerik:GridSortExpression> 
                        </SortExpressions> 
                     </telerik:GridTableView> 
                </DetailTables> 
                <Columns> 
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">  
                        <HeaderStyle Width="20px" /> 
                        <ItemStyle CssClass="MyImageButton" /> 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridBoundColumn SortExpression="point_id" HeaderText="point_id" HeaderButtonType="TextButton" 
                        DataField="point_id" UniqueName="point_id" ReadOnly="true">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn SortExpression="point_name" HeaderText="Name" HeaderButtonType="TextButton" 
                        DataField="point_name" UniqueName="point_name">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn SortExpression="point_adress" HeaderText="Adress" HeaderButtonType="TextButton" 
                        DataField="point_adress" UniqueName="point_adress">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridButtonColumn ConfirmText="Delete this hotel?" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">  
                        <HeaderStyle Width="20px" /> 
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                    </telerik:GridButtonColumn> 
                </Columns> 
                <SortExpressions> 
                    <telerik:GridSortExpression FieldName="point_adress"></telerik:GridSortExpression> 
                </SortExpressions> 
            </MasterTableView> 
        </telerik:RadGrid> 
          
        <%--DATASOURCES --%> 
        <asp:SqlDataSource ID="SessionDataSource1" ConnectionString="<%$ ConnectionStrings:MyProv %>" 
            ProviderName="<%$ ConnectionStrings:MyProv.ProviderName %>" 
            SelectCommand="SELECT * FROM loc_OnTrip" runat="server"   
             OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues">  
              
        </asp:SqlDataSource> 
          
        <asp:SqlDataSource ID="SessionDataSource2" ConnectionString="<%$ ConnectionStrings:MyProv %>"   
            ProviderName="<%$ ConnectionStrings:MyProv.ProviderName %>" 
            SelectCommand="SELECT * FROM [loc_OnTrip_Service] Where point_id = @point_id" runat="server"   
            OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues" > 
            <SelectParameters> 
                <asp:Parameter Name="point_id" Type="string" />   
            </SelectParameters> 
        </asp:SqlDataSource> 
          
        <asp:SqlDataSource ID="SessionDataSource3" ConnectionString="<%$ ConnectionStrings:MyProv%>"   
            ProviderName="<%$ ConnectionStrings:MyProv.ProviderName %>"   
            SelectCommand="SELECT * FROM [loc_OnTrip_Service_room] where service_id = @service_id" runat="server"   
            OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues" > 
            <SelectParameters> 
                <asp:Parameter Name="service_id" Type="string" />   
            </SelectParameters> 
        </asp:SqlDataSource> 
        <br /> 

aspx.cs
private void Page_Load(object sender, EventArgs e)  
        {  
            if (!IsPostBack)  
            {  
                //Setting Selected index prior to binding RadGrid:  
                //If the index is in detail table, parent items will be expanded  
                //automatically   
                RadGrid1.SelectedIndexes.Add(1, 0, 1, 0, 0);  
                //Index of 1, 0, 1, 0, 0 means:  
                //1 - item with index 1 in the MasterTabelView  
                //0 - detail table with index 0  
                //1 - item with index 1 (the second item) in the first detail table  
                //0 - 0 the third-level detail table  
                //0 - the item with index 0 in the third-level table  
            }  
        }  
 
        protected void RadGrid1_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)  
        {  
            string item = getItemName(e.Item.OwnerTableView.Name);  
            string field = getFieldName(e.Item.OwnerTableView.Name);  
            if (e.Exception != null)  
            {  
                e.KeepInEditMode = true;  
                e.ExceptionHandled = true;  
                DisplayMessage(item + " " + e.Item[field].Text + " cannot be updated. Reason: " + e.Exception.Message);  
            }  
            else  
            {  
                DisplayMessage(item + " " + e.Item[field].Text + " updated");  
            }  
        }  
 
        protected void RadGrid1_ItemInserted(object source, GridInsertedEventArgs e)  
        {  
            string item = getItemName(e.Item.OwnerTableView.Name);  
            if (e.Exception != null)  
            {  
                e.ExceptionHandled = true;  
                DisplayMessage(item + " cannot be inserted. Reason: " + e.Exception.Message);  
            }  
            else  
            {  
                DisplayMessage(item + " inserted");  
            }  
        }  
 
        protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e)  
        {  
            string item = getItemName(e.Item.OwnerTableView.Name);  
            string field = getFieldName(e.Item.OwnerTableView.Name);  
            if (e.Exception != null)  
            {  
                e.ExceptionHandled = true;  
                DisplayMessage(item + " " + e.Item[field].Text + " cannot be deleted. Reason: " + e.Exception.Message);  
            }  
            else  
            {  
                DisplayMessage(item + " " + e.Item[field].Text + " deleted");  
            }  
        }  
 
        protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)  
        {  
            if ("Service".Equals(e.Item.OwnerTableView.Name))  
            {  
                GridDataItem parentItem = (GridDataItem)e.Item.OwnerTableView.ParentItem;  
                SessionDataSource2.InsertParameters["point_id"].DefaultValue = parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["point_id"].ToString();  
            }  
            else if ("Rooms".Equals(e.Item.OwnerTableView.Name))  
            {  
                GridDataItem parentItem = (GridDataItem)e.Item.OwnerTableView.ParentItem;  
                SessionDataSource3.InsertParameters["service_id"].DefaultValue = parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["service_id"].ToString();  
            }  
        }  
        /* Sample
         protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)  
    {  
        GridDataItem parentItem = e.Item.OwnerTableView.ParentItem as GridDataItem;  
        nestedTableSource.InsertParameters["EmployeeID"].DefaultValue = parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["EmployeeID"].ToString();  
    }  
           
         */  
        private String getItemName(string tableName)  
        {  
            switch (tableName)  
            {  
                case ("Hotel"):  
                    {  
                        return "loc_Ontrip";// for Hotels  
                    }  
                case ("Service"):  
                    {  
                        return "loc_OnTrip_Service";// for services  
                    }  
                case ("Rooms"):  
                    {  
                        return "loc_OnTrip_Services_room"; // for Rooms  
                    }  
                default: return "";  
            }  
        }  
 
        private String getFieldName(string tableName)  
        {  
            switch (tableName)  
            {  
                case ("loc_Ontrip"):  
                    {  
                        return "point_id";  
                    }  
                case ("loc_OnTrip_Service"):  
                    {  
                        return "service_id";  
                    }  
                case ("loc_OnTrip_Services_room"):  
                    {  
                        return "room_id";  
                    }  
                default: return "";  
            }  
        }  
 
        private void DisplayMessage(string text)  
        {  
            RadGrid1.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", text)));  
        } 

Pavel
Telerik team
 answered on 01 Sep 2008
1 answer
77 views
This is off topic, and does not have to do with directly with your software, but I really like the way you have organized your help, and the ability to have it in html, pdf, or chm.  I am looking for a product or means to be able to write documentation once, and have it available via any of the three means.  Is this custom software that you guys wrote, or have you bought a product that helps you.  Can you share any information that would help me do the same thing with my own product?
Ivo
Telerik team
 answered on 01 Sep 2008
1 answer
165 views
Hi,

I am trying to use Treeview which is populated all by the client side. Now the thing is Drag and Drop is not working even though I enabled all the properties as per you document.

Should I handle Drag and Drop myself at the client side ? Shouldn't this work out of the box?
Veselin Vasilev
Telerik team
 answered on 01 Sep 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?