Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
817 views
I cannot get the RadMenu to populate with an .asmx web service. A breakpoint in the service's constructor is hit; however my service method is never invoked. I get a "There was an error processing the request." message in the browser. What could be the cause of this?

My service method has a [WebMethod] attribute. I'm  using a RadScriptManager and the following was added to the web.config:
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" /> 
 

I'm certain the method name specified on the RadMenu declaration is correct. I have WebServiceSettings-UseHttpGet="false". When I set it to true nothing gets invoked at all.

Any suggestions welcome...

Thank you,

Terry
Veselin Vasilev
Telerik team
 answered on 28 Jan 2010
1 answer
105 views
Hello,

Regarding to this sample ..\Live Demos\Menu\Examples\Programming\ClientSideAPI

I'm not able to get the clientID out of a menuItem.

Its always undefined.

What am I doing wrong?

function OpenItem() 
        { 
            var menu = $find("RadMenu1"); 
            var text = $get("openTextBox").value; 
             
            var item = menu.findItemByText(text); 
             
            if (item) { 
                alert(item.ID);   // <----------------------------------------------------------- 
                item.open(); 
            } 
            else 
            { 
                alert("Item with text '" + text + "' not found."); 
            } 
        } 


Vesko
Top achievements
Rank 2
 answered on 28 Jan 2010
3 answers
139 views
hi

is it possible to do edit, insert and delete in data grid from a usercontrol which is loaded in a pageview?

because when i tried to edit after doing the post back my usercontrol which contain the data grid was gone

thanks a lot

regards
webster
Webster Velasco
Top achievements
Rank 2
 answered on 28 Jan 2010
1 answer
250 views
I am having an issue rendering this control on the server side. I did not see any examples to help me do this as well. Can someone help?

Here are the two methods I have tried which do not work...

1)
StringBuilder htmlString = new StringBuilder(); // this will hold the string 
StringWriter stringWriter = new StringWriter(htmlString); 
HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter); 
ratingControl.RenderControl(htmlWriter); 
ratingControlText = stringWriter.ToString(); 

2)
using(System.IO.MemoryStream msOur = new System.IO.MemoryStream())  
{ 
    using(System.IO.StreamWriter swOur = new System.IO.StreamWriter(msOur))  
    {  
        HtmlTextWriter ourWriter = new HtmlTextWriter(swOur); 
        ratingControl.RenderControl(ourWriter); 
 
        using (System.IO.StreamReader oReader = new System.IO.StreamReader(msOur)) 
        { 
            ratingControlText = oReader.ReadToEnd(); 
            oReader.Close(); 
        }  
 
    } 
} 
 

Please help as I need this working yesterday!

Michael
Tsvetie
Telerik team
 answered on 28 Jan 2010
5 answers
310 views
Hi,

I need to open my site in Iframe where domain of my site and parent site is different.
i'm getting access denied cross domain error which is obvious ,but when i'm opening RAD Demo site in IFrame its working fine.
There must be some extra configuration you guys have done in your demo site which makes it working fine in different domains. please let me know the same so that i can add that in my site

i have gone through with the following link
Access Denied - Scripting Error
http://www.telerik.com/community/forums/aspnet-ajax/combobox/access-denied-scripting-error.aspx

also
How to work around the access denied cross-domain frame issue in ASP.NET Ajax 1.0

http://weblogs.asp.net/bleroy/archive/2007/01/31/how-to-work-around-the-quot-access-denied-quot-cross-domain-frame-issue-in-asp-net-ajax-1-0.aspx

But i can't use the above solution as it requires me to replace the RadScriptManager's with the normal ScriptManager
which is not possible in our case as Rad Color Picker is not working properly with normal script manager
also in RAD Demo site you have used RadScriptManger.

I'm attaching sample code i'm using





Veenu
Top achievements
Rank 1
 answered on 28 Jan 2010
8 answers
386 views
Hi,

I'm using the regular Rad Calendar.  I default the selected date to today when my page loads.  Is there a way to not allow the user to unselect a date in the calendar so nothing is selected so I don't have to put in extra validation.
Daniel
Telerik team
 answered on 28 Jan 2010
1 answer
100 views
Hi,

I've created a SharePoint web part for WSS 3.0 that displays a panel bar similar to one i created in an aspx page.  The problem I'm having is that after I've registered a client script block, the script I was using previously to capture what panel was selected, and then close all the others no longer works.  Previously I had the script triggered using OnClientItemClicked on the client side in the aspx page.  Since web parts are only server side, I've added an attribute to the RadPanelbar of onclick to trigger the script below.  Does anyone know why the script below doesn't work?
<script> 
    function onclick(sender, args) {  
        var selectedtext = args.get_item().get_text();  
          
        var panelBar = $find("<%= RadPanelBar1.ClientID %>");  
        //close all other panels when item is clicked  
        var panelItem = panelBar.findItemByText("panel1");  
        panelItem.collapse();  
        panelItem.blur();  
      
        panelItem = panelBar.findItemByText("panel2");  
        panelItem.collapse();  
        panelItem.blur();  
          
        panelItem = panelBar.findItemByText("panel3");  
        panelItem.collapse();  
        panelItem.blur();  
          
        panelItem = panelBar.findItemByText("panel4");  
        panelItem.collapse();  
        panelItem.blur();  
                  
        panelItem = panelBar.findItemByText(selectedtext);  
        panelItem.expand();  
        panelItem.focus();  
        }                         
</script> 
 
Thanks!
Veselin Vasilev
Telerik team
 answered on 28 Jan 2010
2 answers
187 views
Hi all!
I am developing a Required Field Validator for a RadCombobox. The RadCombobox appears when I am modifying an item of a RadGrid, so when the CreateColumnEditor event fires.
My problem is: when I add a new item to my table, there a re no problem, while when I am editing ad existing item the value of the RadComboBox is not taken, so it gives a database exception of violation of integrity contraints.
Here there is the most significative part of my class.
When debugging I can see that the value of the radcomboboxes are wrong, even if the right item is selected.
The validation is done clientside with a javascript, because the RequiredFieldValidator wasn't working (could you please explain me why it wan't? It is in the commented code).

public class ComboEditor : GridDropDownListColumnEditor
{
    private RadComboBox combo;
    private String _datafield;
    private bool _mandatory;
    private bool _enableChange;
    private Unit _width;
    //private RequiredFieldValidator _reqValidator;
    private CustomValidator _reqValidator;

    public ComboEditor(GridDropDownColumn owner, bool mandatory, String datafield, bool enableChange, Unit width)
        : base(owner)
    {
        this._datafield = datafield;
        this._mandatory = mandatory;
        this._enableChange = enableChange;
        this._width = width;
    }


    public RadComboBox ComboControl
    {
        get
            return base.ComboBoxControl;
    }

    [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
    public override int SelectedIndex
    {
        get
            return base.SelectedIndex;
        set
            base.SelectedIndex = value;
    }

    [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
    public override string SelectedValue
    {
        get
            return base.SelectedValue;
        set
            base.SelectedValue = value;
    }

    [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
    public override string SelectedText
    {
        get
            return base.SelectedText;
        set
            base.SelectedText = value;
    }

    protected override void LoadControlsFromContainer()
    {
        this.combo = this.ContainerControl.Controls[0] as RadComboBox;
    }

    protected override void AddControlsToContainer()
    {
        HtmlGenericControl divCombo = new HtmlGenericControl("DIV");
        divCombo.Attributes.Add("style", "padding-bottom: 3px;");

        if (this.ContainerControl.Parent != null)
        {
            foreach (GridTableRow row in this.ContainerControl.Parent.Parent.Controls)
                (row.Controls[0] as GridEditFormItem.EditFormTableCell).VerticalAlign = VerticalAlign.Top;
        }

        this.combo.NoWrap = false;
        this.combo.MarkFirstMatch = true;
        this.combo.AllowCustomText = false;
        this.combo.Skin = "WebBlue";
        this.combo.CausesValidation = true;
        this.combo.Width = this._width;
        this.combo.ToolTip = "Select " + this._datafield + "...";
        this.combo.ID = "cmb" + this._datafield.Replace(" ", "");
        divCombo.Controls.Add(this.combo);
        this.ContainerControl.Controls.Add(divCombo);

        if (this._mandatory)
        {
            this._reqValidator = new CustomValidator();
            this._reqValidator.ID = "req" + this._datafield.Replace(" ", "");
            this._reqValidator.ErrorMessage = "  This field is required.";
            this._reqValidator.ControlToValidate = this.combo.ID;
            this._reqValidator.ClientValidationFunction = "ValidateComboBox";
            this._reqValidator.EnableClientScript = true;
            this.ContainerControl.Controls.Add(this._reqValidator);
            
            /*this._reqValidator = new RequiredFieldValidator();
            this._reqValidator.ID = "pippo";
            this._reqValidator.ErrorMessage = "This field is required.";
            this._reqValidator.ControlToValidate = this.combo.ID;
            this._reqValidator.InitialValue = "";
            this.ContainerControl.Controls.Add(this._reqValidator);  */
        }       
    }

    protected override void CreateControls()
    {
        base.CreateControls();
        base.ControlsCreated = true;
        this.combo = base.ComboBoxControl;
    }

}
Dario Zanelli
Top achievements
Rank 1
 answered on 28 Jan 2010
1 answer
107 views
When I create a new VB.NET Website using Telerik template, the following error thrown:
-----------------
Error: this template attempted to load an untrusted component 'Telerik.Web.UI.VSX, Version=2009.03.1313.0, Culture=neutral, PublicKeyToken=0dfdc51bd06071b4'. For more information on this problem and how to enable this template, please see documentation on Customizing Project Templates.
-----------------
RadControls version is 2009.3.1314
Erjan Gavalji
Telerik team
 answered on 28 Jan 2010
3 answers
194 views
My code as I see it is exactly the same as the demo explaining this (I think).
Hope someone can find out why mt Radtree is not displaying any data.

This is my code:

    <telerik:RadTreeView ID="RadTreeView1" runat="server" Width="100%" Height="250px" 
          DataFieldID="code" DataFieldParentID="parentcode" 
        DataTextField="absencereasonname" DataValueField="code"   
        DataSourceID="LinqDataSource1">  
        <DataBindings> 
            <telerik:RadTreeNodeBinding Depth="0" Expanded="true" /> 
        </DataBindings> 
    </telerik:RadTreeView> 
    <asp:LinqDataSource ID="LinqDataSource1" runat="server"    
        ContextTypeName="Orbit.Benjamin.DB.PartyDataContext"   
        TableName="AbsenceReasons"   
        Select="new (code, absencereasonname, parentcode)">  
    </asp:LinqDataSource> 
 

and this is my DB table structure

    [code] [nvarchar](10) NOT NULL,  
    [absencereasonname] [nvarchar](100) NULL,  
    [parentcode] [nvarchar](10) NULL, 

I am calling DataBind() on PageLoad but my tree returns with 0 nodes.
This looks simple enough but I can not find out what I am doing wrong.

reg.
Axel
Axel
Top achievements
Rank 2
 answered on 28 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?