We can take the earlier example and improve on it considerably. It would feel quite natural to subclass the grid panel. Ext JS encourages this, and Ext.NET provides excellent support for this concept. The basic approach involves the following:
Subclassing the component on the .NET side
Subclassing the component on the Ext JS side (optional)
Adding custom CSS (optional)
Defining custom events (optional)
Adding MVC support (optional)
Let's see how this might work. To keep things simplified, we will extend the GridPanel to become a reusable financial grid panel.
In this approach we will do the following, while extending the GridPanel:
Initialize the
Store
,Columns
, and various other properties.Define the Ext JS component and instance type (optional).
Include associated CSS and JavaScript as embedded resources (optional).
The reason behind the final two points being optional is that for very simple components, a corresponding Ext JS subclass may...