Configuration

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

The following properties of the UniGrid control can be set or used in the API:

 

Property Name

Description

Sample Value

Columns

Specifies the columns that should be loaded from the data source specified in the DataSource property.

 

By default, the values of the first column are passed as the actionArgument parameter of the OnAction event handler. This can be overridden in the XML configuration file by specifying a column name in the commandargument attribute of individual <action> elements.

 

CompleteWhereCondition

Can be used to get the used WHERE clause including any modifications applied by the filter.

 

DataSource

Can be used to gets or set an object (DataSet or DataTable) containing the data to be displayed by the UniGrid control.

 

DelayedReload

If enabled, data will not be loaded automatically during the Load event of the page and the ReloadData() method must be called manually instead.

 

FilterDirectoryPath

Path to the control (.ascx file) that should be used instead of the default filter. The default relative path is ~/CMSAdminControls/UI/UniGrid/Filters/.

 

FilteredZeroRowsText

Text to be shown when no rows are displayed after the filter is applied.

 

FilterLimit

Determines the minimum amount of rows that must be displayed in the UniGrid before a filter is shown. The default value is read from the CMSDefaultListingFilterLimit web.config key.

 

GridName

Contains the name of the XML file that defines the structure and behaviour of the UniGrid control. For more information, please refer to the XML definition topic.


GridView

Can be used to access the GridView control encapsulated by the UniGrid.

 

HideControlForZeroRows

Indicates whether the control should be hidden when no rows are loaded. The control is not hidden if the filter causes zero rows to be displayed.

 

ImageDirectoryPath

Path to the directory that contains images used by the control. The default value is ~/App_Themes/Default/Images/Design/Controls/UniGrid/Actions.

 

ObjectType

Can be used to define the data class of the objects that should be displayed by the UniGrid control. A list of all data classes and related information can be found in the CMS_Class database table.

 

Alternatively, the same can be defined in the XML configuration file through the <objecttype> element as described in the following topic.

 

OrderBy

The ORDERBY clause used to determine how the UniGrid rows are sorted when the page is first loaded.

 

Pager

Can be used to access the UniGridPager control used for paging.


PageSize

This setting can be used to override the default values offered by the page size selection drop‑down list. Values must be separated by commas.

 

The ##ALL## macro can be used as a value to indicate that all rows should be displayed.

 

The default value is “25,50,100,##ALL##”.

"10,20,##ALL##"

Query

Can be used to specify the name of the query that should be used to retrieve data from the Kentico CMS database to be displayed by the UniGrid control. The name is entered in format <class name>.<query name>.

 

Alternatively, the same can be defined in the XML configuration file through the <query> element as described in the following topic.

"cms.user.selectallview"

SelectedItems

Gets (as an ArrayList) or sets the currently selected rows from the UniGrid.

 

SortDirect

The ORDERBY clause reflecting the current row sorting being used by the UniGrid.

 

TopN

Specifies the maximum amount of rows that should be selected.

 

WhereCondition

Can be used to get the used WHERE clause without modifications applied by the filter.

 

ZeroRowsText

Text to be shown when the control is hidden by the HideControlForZeroRows property.

 

 

The following events of the UniGrid control are available:

 

Event Name

Description

OnAction

Occurs when one of the actions of the control is used. The name of the given action is passed as a parameter to the handlers of the event. An example of how it is used can be found in the tutorial found in the Getting started topic.

OnExternalDataBound

Occurs after data is loaded. It is used to implement a custom design or functionality for UniGrid columns, including the action column. An example of how it is used can be found in the Implementing custom functionality topic.

OnBeforeDataReload

This event can be used to perform any actions before the ReloadData() method is executed.

OnAfterDataReload

This event can be used to perform any actions after the ReloadData() method is executed.

 

Page url: http://devnet.kentico.com/docs/5_5r2/controls/index.html?unigrid_configuration.htm