This is a migrated thread and some comments may be shown as answers.
Dynamic RadCombo with WebserviceSettings
1 Answer 46 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
cbospikes asked on 16 Jun 2009, 06:16 PM
I am exploring building forms dynamically.
I have gotten pretty far but I am of course battling an issue that could kill the whole concept.

I am creating the radcombo from text in a database, using the .net reflection class



thisAssembly As [Assembly] = [Assembly].GetExecutingAssembly()



Dim RefAssembly As AssemblyName



For Each RefAssembly In thisAssembly.GetReferencedAssemblies()



Dim refAssembly2 As Assembly = [Assembly].Load(RefAssembly.FullName.ToString())



Dim ct2 As Type = refAssembly2.GetType("Telerik.Web.UI.RadComboBox")



Dim c2 As Object = Activator.CreateInstance(ct2)




I am able to set most properties from information in the database like so:

Dim prop As PropertyInfo = t2.GetProperty("EnableLoadOnDemand")



Dim propval2 As Object = Convert.ChangeType("True", Type.[GetType]("System.Boolean"))


prop.SetValue(c2, propval2,




There is a property I would like to set that I am having trouble with.
The WebServiceSettings property is a class that does not contain a setvalue method.

I've tried creating an instance of the webservicesettings class, setting its properties and using that object to set the
webservicesettings property of the  radcombobox, but to no avail.

I considered the approach of maybe using custom attributes to hold the path and method values and setting the corresponding properties client side but I didn't see that this was possible in the documentation and figured I had spent enough time on this to warrant posting and trying to get some direction.

Thanks in advance for your help.

1 Answer, 1 is accepted

Sort by
Atanas Korchev
Telerik team
answered on 17 Jun 2009, 01:35 PM
Hello cbospikes,

WebServiceSettings is readonly composite property. You should first get its value then use reflection on the returned value in order to set the Path and Method properties.

Kind regards,
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Asked by
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question