开发者

Inheritance and Telerik RadControls (RadMenu)

开发者 https://www.devze.com 2022-12-31 16:10 出处:网络
I am trying to create a custom (CustTreeView) control by inheriting from a Telerik control (RadTreeView) by doing the following:

I am trying to create a custom (CustTreeView) control by inheriting from a Telerik control (RadTreeView) by doing the following:

public class CustTreeView : RadTreeView  

but not all methods appear to be inherited. For example, I can do:

  RadTreeView r = new RadTreeView();  
  r.LoadContentFile("Sample.xml");

but not:

 CustTreeView r = new CustTreeView ();
 r.LoadContentFile("Sample.xml");

so LoadContentFile doesn't appear to be in CustTreeView! Any explanation?

Here is the RadTreeView LoadContentFile method signature:

public void LoadCon开发者_如何转开发tentFile(string path)


According to the docs, that method is public. What error are you getting? Perhaps you're just missing a reference and Intellisense can't resolve the method for you?


The method is public so it must remain available in the sub-class. Try re-building your solution for intellisense to update.


Sometimes it is intellisense refreshing issue. You can try to manually type it and build, it will compile and the intellisence will be back.

0

精彩评论

暂无评论...
验证码 换一张
取 消