RadTextBox: GetScriptDescriptors

4 posts, 1 answers
  1. lemon
    lemon avatar
    13 posts
    Member since:
    Mar 2009

    Posted 08 Oct 2009 Link to this post

    Hello,

    how can I add additional scriptDescriptors and scriptReferences to a RadTextBox control?

    This doesn't work:

     

     

     

     

    protected override IEnumerable<ScriptReference> GetScriptReferences()     
    {  
    IEnumerable<ScriptReference> baseSR = base.GetScriptReferences();   
     
    List<ScriptReference> mySR = baseSR as List<ScriptReference>;   
    mySR.Add(new ScriptReference("MyClientScript.js"));     
     
    return mySR as IEnumerable<ScriptReference>;   
    }  
        
    protected override IEnumerable<ScriptDescriptor> GetScriptDescriptors()   
    {  
    IEnumerable<ScriptDescriptor> baseSD= base.GetScriptDescriptors();   
     
    List<ScriptDescriptor> mySD= baseSD as List<ScriptDescriptor>;  
    ....  
    ....  
     
    mySD.Add(desc);  
     
    return mySD as IEnumerable<ScriptDescriptor>;   
    }  
     



    I get the error: this.get_styles().EnabledStyle
    best regards

     

     

     

     

    lemon 

     

     

     

     

     

     

     

  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2289 posts

    Posted 12 Oct 2009 Link to this post

    Hello Lemon,

    For your convenience I am attaching sample that demonstrates how to override GetScriptReferences of RadTextBox.
    I hope this helps.

    Regards,
    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. lemon
    lemon avatar
    13 posts
    Member since:
    Mar 2009

    Posted 12 Oct 2009 Link to this post

    Hi,
    Thanks alot, but where have u attached it?

    lemon
  4. Answer
    Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2289 posts

    Posted 15 Oct 2009 Link to this post

    Hello Lemon,

    Sorry for the late response. Seems like there was a problem with the attachment. I am re-attaching the sample application once again.

    Sincerely yours,
    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top