AdvantageGrid Members
The AdvantageGrid type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
|
|
AdvantageGrid |
Initializes a new instance of AdvantageGrid and wires up the
IAdvantageControl ambient context (current domain, language, user, SQL
helper). Telerik's grid configuration is applied later in OnInit(EventArgs).
|
Methods
| Name | Description | |
|---|---|---|
|
|
EmptySortedList<(Of <<'(T>)>>) |
Returns a new empty List of the same element type as
myObjectList. The input is used purely for type inference and is not
read; equivalent to new List<T>() but lets callers avoid restating the type
argument.
|
|
|
GetRecordFromList<(Of <<'(T>)>>) |
Locates a record in myObjectList whose properties match every
GridDataKeyValue in keyCritera. Used by event handlers
to resolve Item back to the original entity in the
caller's source list.
|
|
|
grdItems_ItemCommand |
Translates Telerik grid commands (InitInsert, Select, Delete,
Active/InActive, Featured/NotFeatured) into the strongly-typed
OnLoadObject, OnDeleteObject,
OnToggleActive, OnToggleFeature events. Cancels Telerik's
built-in insert flow on the Add button — the host is expected to raise its own edit
form instead.
|
|
|
grdItems_RowDrop |
Builds the post-drop ordering and raises OnReordered. Walks the
destination table view, swapping the dragged and target rows according to
GridItemDropPosition, and emits the new sequence as
Items. No-ops when the drop occurs on an external
HTML element.
|
|
|
grdListItems_PreRender |
Materialises the user's Columns into Telerik
GridBoundColumn instances inserted between the auto-generated Edit
column (index 0) and the Active/Feature/Delete trio (last 3). Also applies
ShowEditFunction, ShowDeleteFunction and the active/feature
column visibility derived from whether handlers are attached.
|
|
|
OnInit |
Applies grid configuration, adds the four template columns (Edit / Feature / Active /
Delete), wires ItemCommand, ItemDataBound and RowDrop to the
internal handlers, and honours DisableSorting before deferring to the
base implementation.
|
|
|
OnLoad |
Re-applies the current DataKeyNames to
MasterTableView.DataKeyNames at OnLoad. This is the closing of a timing
gap: the same assignment runs in InitializeControl()()()() (during OnInit, picks
up markup-set values) and in grdListItems_PreRender(Object, EventArgs) (catches anything
set after Load). The OnInit pass alone misses code-behind values written by the host
in its own OnInit body, Page_Load, or grid-property setter calls in
load-time code — those run AFTER the child grid's OnInit because child OnInit cascades
before parent OnInit. Setting at OnLoad here, AFTER LoadViewState and AFTER the host's
own OnLoad / Page_Load has cascaded down, makes [MasterTableView.DataKeyNames]
reflect the configured value before ItemCommand and other postback events fire
— so event args land with the right DataField entries
for the host's resolve-row-from-keys logic.
|
|
|
OnPreRender |
Synchronises the toolbar buttons with the Show… flags, materialises the user's
Columns definitions into Telerik GridBoundColumn instances,
and triggers a final Rebind()()()() so the grid renders with the latest
data.
|
Properties
| Name | Description | |
|---|---|---|
|
|
Columns |
The visible data columns, declared either inline in markup (inside a <Columns>
tag) or programmatically. This property hides Telerik's
RadGrid.Columns with a strongly-typed list of
GridColumnDefinition; entries are converted to
GridBoundColumn instances during OnPreRender(EventArgs) and slotted
between the auto-generated Edit and Active/Feature/Delete columns.
|
|
|
CurrentDomain |
Gets the domain currently scoped to this control.
|
|
|
CurrentLanguage |
Gets the language currently scoped to this control.
|
|
|
CurrentSql |
Gets the SQL helper scoped to the current request.
|
|
|
CurrentUser |
Gets the authenticated user executing the current request.
|
|
|
DataKeyItems |
The key field/value pairs identifying the row most recently selected for edit, persisted
across postbacks via XML serialisation into ViewState. The setter is
protected internal — the grid populates it during the Edit command; the host
reads it to associate an edit-form save with the right row.
|
|
|
DataKeyNames |
Names of the property/properties on the row's data object that uniquely identify it.
Composite keys are supported by listing multiple field names. The values for the clicked
row are bundled as GridDataKeyValue entries on every event.
|
|
|
DisableSorting |
When true, disables drag-drop reordering and row selection. Use for grids whose
order is determined by data (e.g. natural sort on a name column) rather than by an
explicit SortOrder property.
|
|
|
ShowActiveButton |
Whether to render the active/inactive toggle column. The column is also auto-hidden
when the row's data object lacks an IsActive property or when no
OnToggleActive handler is attached.
|
|
|
ShowAddFunction |
Whether to render the toolbar Add button. Setting this to false still allows
edit/delete on existing rows but blocks creation.
|
|
|
ShowDeleteFunction |
Whether to render the per-row Delete (X) column. Set to false when rows are
soft-deleted via the active toggle instead.
|
|
|
ShowEditFunction |
Whether to render the per-row Edit (pencil) column. Set to false for read-only
or display-only grids.
|
|
|
ShowFeatureButton |
Whether to render the featured/not-featured toggle column. Auto-hidden when the row's
data object lacks an IsFeatured property or when no
OnToggleFeature handler is attached.
|
Events
| Name | Description | |
|---|---|---|
|
|
OnDeleteObject |
Raised when the user clicks the per-row Delete (X) icon. The handler is responsible for
removing the entity from the source list, persisting, and rebinding the grid.
|
|
|
OnLoadObject |
Raised when the user clicks the toolbar Add button or the per-row Edit pencil. Inspect
CommandType to distinguish:
Add means clear the form for a new entity;
Edit means populate the form from
Item.
|
|
|
OnReordered |
Raised after a drag-drop reorder. The handler typically iterates
Items, assigns each entity's SortOrder to the
loop index, and persists.
|
|
|
OnToggleActive |
Raised when the user clicks the active/inactive icon. The handler should set
IsActive on the resolved row to Toggle and
persist. The active column is hidden if no handler is attached.
|
|
|
OnToggleFeature |
Raised when the user clicks the featured/not-featured icon. The handler should set
IsFeatured on the resolved row to Toggle
and persist. The feature column is hidden if no handler is attached.
|

