PDA

View Full Version : [CLOSED] Inheritance / ReUse of Controls - Component Library



RajivDutt
Apr 07, 2014, 12:40 PM
Hi,

I am trying to implement inheritance/reusability in EXT.Net MVC Controls.

For example :

I want to create a control like MyCombo, instead of using ComboBox

Current Code

@Html.X.ComboBox().ID("cmb1").AutoSelect(true)

Future Code

@Html.MyCombo().ID("cmb1");

In this example, AutoSelect property is already set to True, by the base class (MyCombo). Developer don't need to do this setting everytime.

Is it possible and how this can be implemented?

Thanks,
Rajiv Dutt

Daniil
Apr 07, 2014, 5:29 PM
Hi @RajivDutt,

Here is a tutorial.
http://forums.ext.net/showthread.php?27672

If you don't need "MyComboFor" helpers, please don't add to the Builder class the methods ending to "For".