This is a migrated thread and some comments may be shown as answers.

RadTextBox: GetScriptDescriptors

3 Answers 63 Views
Input
This is a migrated thread and some comments may be shown as answers.
lemon
Top achievements
Rank 1
lemon asked on 08 Oct 2009, 10:49 AM
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 

 

 

 

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 12 Oct 2009, 12:51 PM
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.
0
lemon
Top achievements
Rank 1
answered on 12 Oct 2009, 01:56 PM
Hi,
Thanks alot, but where have u attached it?

lemon
0
Accepted
Nikolay Rusev
Telerik team
answered on 15 Oct 2009, 01:24 PM
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.
Tags
Input
Asked by
lemon
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
lemon
Top achievements
Rank 1
Share this question
or