Class GridViewManager
Controller/Manager to work with Simplic Grid Views
Inheritance
Inherited Members
Namespace: Simplic.Framework.DBUI
Assembly: Simplic.Framework.DBUI.dll
Syntax
public class GridViewManager
Properties
| Improve this Doc View SourceSingleton
Singleton access to the GridViewManager
Declaration
public static GridViewManager Singleton { get; }
Property Value
Type | Description |
---|---|
GridViewManager |
Methods
| Improve this Doc View SourceConvertFromJson(String)
Convert json string to GridContainerModel
Declaration
public GridContainerModel ConvertFromJson(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | JSON string |
Returns
Type | Description |
---|---|
GridContainerModel | Instance of a configuration model |
DeleteConfiguration(Guid)
Remove Grid configuration from the database
Declaration
public void DeleteConfiguration(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique id of the gird to remove |
FillProfile(UI_Grid_Profile)
Declaration
public GridProfileConfigurationModel FillProfile(UI_Grid_Profile profile)
Parameters
Type | Name | Description |
---|---|---|
UI_Grid_Profile | profile |
Returns
Type | Description |
---|---|
GridProfileConfigurationModel |
GetAPIModel(Guid)
Get a grid configuration by its id
Declaration
public static GridContainerModel GetAPIModel(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique configuration id |
Returns
Type | Description |
---|---|
GridContainerModel | Configuration instance |
GetConfiguration(Guid, Boolean, Boolean)
Get a grid configuration over unique grid id (Guid)
Declaration
public GridContainerModel GetConfiguration(Guid id, bool ignoreDeactivatedProfiles = false, bool forceUpdate = false)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique id (Guid) of the grid configuration to retrieve |
System.Boolean | ignoreDeactivatedProfiles | If set to true, deactiavetd profiles will be ignored |
System.Boolean | forceUpdate | If true, ignores the cache and reloads. |
Returns
Type | Description |
---|---|
GridContainerModel | Null if no grid was found, else instance of a grid configuration |
GetConfiguration(String, Boolean, Boolean)
Get a grid configuration over the grid-name
Declaration
public GridContainerModel GetConfiguration(string internName, bool ignoreDeactivatedProfiles = false, bool forceUpdate = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | internName | Unique name of the grid |
System.Boolean | ignoreDeactivatedProfiles | If set to true, deactiavetd profiles will be ignored |
System.Boolean | forceUpdate | If true, ignores the cache and reloads. |
Returns
Type | Description |
---|---|
GridContainerModel | Null if no grid was found, else instance of a grid configuration |
GetDefaultProfileSelection(Guid, Int32)
Get the default profile for the specific grid for a user
Declaration
public Guid GetDefaultProfileSelection(Guid gridId, int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | gridId | Unique grid id |
System.Int32 | userId | Unique user id |
Returns
Type | Description |
---|---|
System.Guid | Default profile id if found, else an empty guid |
GetGridCellHighlight(Guid)
Declaration
public GridCellHilightSqlCollection GetGridCellHighlight(Guid columnId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | columnId |
Returns
Type | Description |
---|---|
GridCellHilightSqlCollection |
MergeProfilesAndUserSettings(ObservableCollection<GridProfileConfigurationModel>)
Merges grid profiles with user settings belonging to that profile.
Declaration
public ObservableCollection<GridProfileConfigurationModel> MergeProfilesAndUserSettings(ObservableCollection<GridProfileConfigurationModel> profiles)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ObjectModel.ObservableCollection<GridProfileConfigurationModel> | profiles | Grid Profiles |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<GridProfileConfigurationModel> | Grid profiles merged with user settings |
RemoveDefaultProfileSelection(Guid, Int32)
Remove the default selected profile
Declaration
public void RemoveDefaultProfileSelection(Guid gridId, int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | gridId | Unique id of the grid |
System.Int32 | userId | Unique id of the user |
RemoveUserProfileSettings(GridProfileConfigurationModel)
Remove the settings for the current user profile
Declaration
public void RemoveUserProfileSettings(GridProfileConfigurationModel model)
Parameters
Type | Name | Description |
---|---|---|
GridProfileConfigurationModel | model | Instance of a profile model |
SaveConfiguration(GridContainerModel, SaveGridBehaviour)
Save grid configuration in the database
Declaration
public void SaveConfiguration(GridContainerModel configuration, SaveGridBehaviour behaviour = SaveGridBehaviour.None)
Parameters
Type | Name | Description |
---|---|---|
GridContainerModel | configuration | Instance of the configuration model |
SaveGridBehaviour | behaviour | behaviour when saving grids |
SaveUserProfileSettings(GridProfileConfigurationModel)
Save settings for the current user-profile
Declaration
public void SaveUserProfileSettings(GridProfileConfigurationModel model)
Parameters
Type | Name | Description |
---|---|---|
GridProfileConfigurationModel | model | Instance of a profile model |
SetDefaultProfileSelection(Guid, Int32, Guid)
Save or update the default profile
Declaration
public void SetDefaultProfileSelection(Guid gridId, int userId, Guid profileId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | gridId | Unique id of the grid |
System.Int32 | userId | Unique id of the user |
System.Guid | profileId | Unique id of the profile |