Grid View
id
Get the view id
tableId
Get the id of current view belongs to
getType
Get the type of the view. Returns ViewType.Grid
for table view.
getType(): Promise<ViewType.Grid>;
getType(): Promise<ViewType.Grid>;
getMeta
getMeta(): Promise<IGridViewMeta>;
getMeta(): Promise<IGridViewMeta>;
Get GridView meta information, where the IGridViewMeta
type is defined as:
interface IGridViewMeta {
id: string;
name: string;
type: ViewType.Grid;
property: {
hierarchyConfig: {
fieldId: string | undefined;
};
filterInfo: IFilterInfo | null;
sortInfo: ISortInfo[];
groupInfo: IGroupInfo[];
}
}
interface IGridViewMeta {
id: string;
name: string;
type: ViewType.Grid;
property: {
hierarchyConfig: {
fieldId: string | undefined;
};
filterInfo: IFilterInfo | null;
sortInfo: ISortInfo[];
groupInfo: IGroupInfo[];
}
}
getFieldMetaList
getFieldMetaList(): Promise<IFieldMeta[]>;
getFieldMetaList(): Promise<IFieldMeta[]>;
Get the list of field metadata. The field metadata is ordered as it appears in the UI.
getVisibleRecordIdList
getVisibleRecordIdList(filterInfo?: IFilterInfo, sortInfo?: ISortInfo[]): Promise<(string | undefined)[]>;
getVisibleRecordIdList(filterInfo?: IFilterInfo, sortInfo?: ISortInfo[]): Promise<(string | undefined)[]>;
Get the list of visible record IDs based on the filter and sort criteria. You can pass filter and sort information to get the filtered and sorted record IDs. (IFilterInfo definition and ISortInfo definition)
getVisibleFieldIdList
getVisibleFieldIdList(): Promise<string[]>;
getVisibleFieldIdList(): Promise<string[]>;
Get the list of visible field IDs.
getChildRecordIdList
getChildRecordIdList(parentRecordId: string): Promise<RecordId[] | undefined>;
getChildRecordIdList(parentRecordId: string): Promise<RecordId[] | undefined>;
Get the list of child record IDs for a given parent record ID. Returns undefined if the record has no child records.
getFilterInfo
getFilterInfo(): Promise<IFilterInfo | null>;
getFilterInfo(): Promise<IFilterInfo | null>;
Get the current filter information. (IFilterInfo definition)
addFilterCondition
addFilterCondition: (param: IAddFilterConditionParams) => Promise<boolean>;
addFilterCondition: (param: IAddFilterConditionParams) => Promise<boolean>;
Add a filter condition. Returns false if the addition fails. (Calling this API does not save the modified settings. To save the modifications, you need to call view.applySetting()
separately.)
deleteFilterCondition
deleteFilterCondition: (conditionId: string) => Promise<boolean>;
deleteFilterCondition: (conditionId: string) => Promise<boolean>;
Delete a filter condition. Returns false if the deletion fails. (Calling this API does not save the modified settings. To save the modifications, you need to call view.applySetting()
separately.)
updateFilterCondition
updateFilterCondition: (param: IUpdateFilterConditionParams) => Promise<boolean>;
updateFilterCondition: (param: IUpdateFilterConditionParams) => Promise<boolean>;
Update a filter condition. Returns false if the update fails. (Calling this API does not save the modified settings. To save the modifications, you need to call view.applySetting()
separately.)
setFilterConjunction
setFilterConjunction: (conjunction: FilterConjunction) => Promise<boolean>;
setFilterConjunction: (conjunction: FilterConjunction) => Promise<boolean>;
Set the conjunction between filter conditions. The FilterConjunction type is defined as:
enum FilterConjunction {
And = "and",
Or = "or"
}
enum FilterConjunction {
And = "and",
Or = "or"
}
You can choose to satisfy all filter conditions or any of the conditions. (Calling this API does not save the modified settings. To save the modifications, you need to call view.applySetting()
separately.)
getSortInfo
getSortInfo(): Promise<ISortInfo[]>;
getSortInfo(): Promise<ISortInfo[]>;
Get the current sort information. (ISortInfo definition)
setAutoSort
setAutoSort(param: boolean): Promise<boolean>;
setAutoSort(param: boolean): Promise<boolean>;
Set whether to automatically sort the table. After setting the sort criteria, it will automatically be set to true. (Calling this API does not save the modified settings. To save the modifications, you need to call view.applySetting()
separately.)
addSort
addSort: (param: ISortInfo | ISortInfo[]) => Promise<boolean>;
addSort: (param: ISortInfo | ISortInfo[]) => Promise<boolean>;
Add a new sorting condition (when calling this API, the modified settings will not be saved. If you need to save, you need to call view.applySetting()
separately)
deleteSort
deleteSort: (param: ISortInfo | string) => Promise<boolean>;
deleteSort: (param: ISortInfo | string) => Promise<boolean>;
Delete sorting condition (when calling this API, the modified settings will not be saved. If you need to save, you need to call view.applySetting()
separately)
updateSort
updateSort: (param: ISortInfo) => Promise<boolean>;
updateSort: (param: ISortInfo) => Promise<boolean>;
Update sorting condition (when calling this API, the modified settings will not be saved. If you need to save, you need to call view.applySetting()
separately)
getGroupInfo
getGroupInfo(): Promise<IGroupInfo[]>;
getGroupInfo(): Promise<IGroupInfo[]>;
Get group information (IGroupInfo definition)
addGroup
addGroup: (param: IGroupInfo | IGroupInfo[]) => Promise<boolean>;
addGroup: (param: IGroupInfo | IGroupInfo[]) => Promise<boolean>;
Add a new group (when calling this API, the modified settings will not be saved. If you need to save, you need to call view.applySetting()
separately)
deleteGroup
deleteGroup: (param: string | IGroupInfo) => Promise<boolean>;
deleteGroup: (param: string | IGroupInfo) => Promise<boolean>;
Delete group (when calling this API, the modified settings will not be saved. If you need to save, you need to call view.applySetting()
separately)
updateGroup
updateGroup: (param: IGroupInfo) => Promise<boolean>;
updateGroup: (param: IGroupInfo) => Promise<boolean>;
Update group (when calling this API, the modified settings will not be saved. If you need to save, you need to call view.applySetting()
separately)
showField
showField: (fieldId: string | string[]) => Promise<boolean>;
showField: (fieldId: string | string[]) => Promise<boolean>;
Show field
hideField
hideField: (fieldId: string | string[]) => Promise<boolean>;
hideField: (fieldId: string | string[]) => Promise<boolean>;
Hide field
setFieldWidth
setFieldWidth(fieldId: string, width: number): Promise<boolean>;
setFieldWidth(fieldId: string, width: number): Promise<boolean>;
Set field width
setRowHeight
setRowHeight(rowHeight: RowHeightLevel): Promise<boolean>;
setRowHeight(rowHeight: RowHeightLevel): Promise<boolean>;
Set row height, currently, row heights are from short to tall as follows (when calling this API, the modified settings will not be saved. If you need to save, you need to call view.applySetting()
separately)
enum RowHeightLevel {
Short = 1,
Medium = 2,
Tall = 3,
ExtraTall = 4
}
enum RowHeightLevel {
Short = 1,
Medium = 2,
Tall = 3,
ExtraTall = 4
}
applySetting
applySetting(): Promise<void>;
applySetting(): Promise<void>;
Submit the set grouping/filtering/sorting and synchronize with other users