The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientGridView.SelectRowsByKey(keys) Method

Selects or deselects the specified row in the grid.

Declaration

SelectRowsByKey(keys: any[] | any, selected?: boolean): void

Parameters

Name Type Description
keys any[] | any

Optional Parameters

Name Type Default Description
selected boolean null

true to select the specified row; false to deselect the row.

Remarks

Note
  • If multiple key fields are set via the grid's ASPxGridBase.KeyFieldName property, a specific service vertical bar symbol (the symbol |) is used to separate key field values in the string returned by the SelectRowsByKey method.
  • The SelectRowsByKey method sends callback to accomplish selection.

Concept

Example

  function OnInit(s, e) {
            var keys = [];
            var count = selList.GetItemCount();
            if (count != 0) {
                for (var i = 0; i < count; i++)
                    keys.push(selList.GetItem(i).value);
                s.SelectRowsByKey(keys);
            }
            else s.UnselectRows();
        }
See Also