Customizing RadarCube for ASP.NET
Posted by - NA - on 01 June 2009 01:13 PM
|
|||||
One of the essential issues that characterize any software is its customization ability, or, in other words, the means to adjust its settings for the needs of an end-user. The possibility to adjust the settings is crucial for such products as the NET-components – since too often the option to set certain parameters is decisive, when it comes to using this or that control for solving the task. This article discusses the general ways of customizing RadarCube for ASP.NET. To begin with, let’s see what settings we can adjust, and then discuss how we can do that. Settings To AdjustIn RadarCube for ASP.NET you can set:
Of course, we haven’t even touched upon the topic of possibilities provided to a programmer by the RadarCube API. In a few words, it is the possibility to programmatically perform any user actions, set the initial appearance of the OLAP-slice, apply both editable and not editable by user filters to an OLAP-slice, save and restore the Grid state, adjust any setting from the above list programmatically – and a lot more. Setting the Appearance of the Control and Its Elements. Managing the Visibility of the Control’s ElementsOne of the first tasks for a programmer to solve is to adapt the appearances of all the elements on the web page to the designer’s pattern. For these purposes, the ASP.NET controls have a lot of properties defined in the Visual Studio designer – and the RadarCube is no exception. Though the mechanism and the setting options will differ slightly, depending on the version of the RadarCube Grid – HTML or Ria. HTML OLAP Grid Setting the Grid appearance had better take two stages: first, you should select the most suitable skin with the «Auto format…» command available in the smart-tags, and then, perform the «fine tuning» by manually setting the appearances of individual Grid elements manipulating the values of the properties in the «Styles» category.
In the HTML OLAP Grid, you can also define the configuration and the layout of the pivot-areas (such as Cube Structure Tree, Rows area, Columns area, etc). Managing the visibility of different areas can be done through the TOLAPGrid.FilterAreaVisible and TOLAPGrid.ShowAreasMode properties, and the technique of changing the panels’ layout is described in the following article: «Customizing the pivot layout in the ASP.NET OLAP Grid». Ria OLAP Grid & Chart Setting the appearance of the Ria controls should be performed through the «Tune appearance» dialogue window available in the smart-tags. Here, again, you’d better start with selecting the most suitable skin, and then, proceed with fine tuning of the elements’ properties. The details of setting the Ria controls’ appearance is discussed in the following article: «The Visual Settings Window in RiaOLAPGrid and RiaOLAPChart Components».
It should be noted that visualizing Ria controls with the help of the Silverlight application provides a wider range of the setting options in comparison with the HTML Grid. For instance, in the Ria controls you can paint elements with complex gradient filling, specifying its direction. This allows you to reproduce the appearance of many well-known applications, such as, for example, MS Office. In the Ria OLAP Grid you can also define the visibility/invisibility of the pivot-areas (such as Cube Structure Tree, Rows area, Columns area, etc). This can be done with the RiaOLAPGrid.VisiblePanels property. Setting the Contents of the CellsIn the previous paragraph, we’ve discussed the possibilities of the declarative description of the Grid elements’ appearances. However, the RadarCube also allows you to modify the style and the appearance of any given Grid cell depending on its contents. This will allow you to solve quite a number of tasks, for instance:
For details of realizing these options in the HTML Grid, see the «Customizing the ASP.NET Grid contents» article; for realizing the same things in the Ria-version, see the «RIA OLAP Grid: Customizing Cells’ Content» article. Setting the Contents of the Context MenusAll versions of RadarCube have a highly developed system of context menus that allow you to perform actions with the clicked visual element of the Grid. More than that, the RadarCube gives you an opportunity to modify or complement with your own items (with your own event handlers, naturally) almost any context menu. For details of how it can be done in Ria controls, see the following article: «Custom menus in RIA controls»
The HTML OLAP Grid applies almost the same mechanism of editing context menus, only the set of objects passed to the corresponding event handler is slightly different. The examples of creating custom menu items in the HTML OLAP Grid are given in the demo-version and in the RadarCube documentation (see the descriptions of the appropriate events). Customizing OLAP-sliceCustomizing the Grid in relation to modifying the Cellset itself is rather a complicated matter, and it demands, depending on the type of the performed actions, the handling of different events and adjusting setting of different objects, available for a programmer through the API. Let’s take a closer look at all these points. Forbidding the display of some rows or columns in the OLAP-slice It should be done with the TOLAPGrid.OnAllowDisplayMember event handler. You can find an example of handling this event in the RadarCube documentation. Setting the layout and the display options of the Total-cells It should be done either with the TOLAPGrid.OnAllowDisplayMember event handler or through setting the Thierarchy.TotalAppearance property of the appropriate hierarchy. Customizing the paging options The declarative setting of the paging option for the whole Grid is performed with the TOLAPGrid.AllowPaging and the TOLAPGrid.LinesInPage properties. The individual tuning of the paging for each hierarchy level is done with the Tlevel.PagerSettings properties. The latter should be set in the TOLAPGrid.OnInitHiererchy event handler. | |||||
|