C# Class SparkleXrm.GridEditor.GridDataViewBinder

Exibir arquivo Open project: scottdurow/SparkleXrm Class Usage Examples

Public Properties

Property Type Description
AddCheckBoxSelectColumn bool
MultiSelect bool
SelectActiveRow bool
ValidationPopupUseFitPosition bool

Public Methods

Method Description
AddColumn ( List cols, string displayName, int width, string field ) : Slick.Column
AddEditIndicatorColumn ( List columns ) : void

Adds a column that shows the state of the row as edited/new

AddRefreshButton ( string gridId, SparkleXrm.GridEditor.DataViewBase dataView ) : void
AddValidation ( Slick.Grid grid, SparkleXrm.GridEditor.DataViewBase dataView ) : void
BindClickHandler ( Slick.Grid grid ) : void

Binds the click handler for opening records from the grid attributes -see the formatters for attributes provided

BindCommitEdit ( ViewModelBase vm ) : void

Wire up the OnCommitEdit event handler for the grid In order to ensure that all grid edits have been commited before a VM command is run, the VM must call CommitEdit on the ViewModelBase and cancel if returns false.

BindRowIcon ( Slick.Column column, string entityLogicalName ) : Slick.Column
ColumnFormatter ( int row, int cell, object value, Slick.Column columnDef, object dataContext ) : string
Comparer ( object l, object r ) : int
DataBindDataViewGrid ( DataView dataView, List columns, string gridId, string pagerId, bool editable, bool allowAddNewRow ) : Slick.Grid

Data Binds the standard Slick.DataView

DataBindEvents ( Slick.Grid grid, SparkleXrm.GridEditor.DataViewBase dataView, string gridContainerDivId ) : void
DataBindSelectionModel ( Slick.Grid grid, SparkleXrm.GridEditor.DataViewBase dataView ) : void
DataBindXrmGrid ( SparkleXrm.GridEditor.DataViewBase dataView, List columns, string gridId, string pagerId, bool editable, bool allowAddNewRow ) : Slick.Grid

DataBinds a DataView that inherits from DataViewBase

NewColumn ( string field, string name, int width ) : Slick.Column
ParseLayout ( string layout ) : List
RowIcon ( int row, int cell, object value, Slick.Column columnDef, object dataContext ) : string

Formattor to get the icon for a row

Private Methods

Method Description
FreezeColumns ( Slick.Grid grid, bool freeze ) : void
ShowLoadingIndicator ( jQueryObject loadingIndicator, string gridContainerDivId ) : jQueryObject

Method Details

AddColumn() public static method

public static AddColumn ( List cols, string displayName, int width, string field ) : Slick.Column
cols List
displayName string
width int
field string
return Slick.Column

AddEditIndicatorColumn() public static method

Adds a column that shows the state of the row as edited/new
public static AddEditIndicatorColumn ( List columns ) : void
columns List
return void

AddRefreshButton() public method

public AddRefreshButton ( string gridId, SparkleXrm.GridEditor.DataViewBase dataView ) : void
gridId string
dataView SparkleXrm.GridEditor.DataViewBase
return void

AddValidation() public method

public AddValidation ( Slick.Grid grid, SparkleXrm.GridEditor.DataViewBase dataView ) : void
grid Slick.Grid
dataView SparkleXrm.GridEditor.DataViewBase
return void

BindClickHandler() public method

Binds the click handler for opening records from the grid attributes -see the formatters for attributes provided
public BindClickHandler ( Slick.Grid grid ) : void
grid Slick.Grid
return void

BindCommitEdit() public method

Wire up the OnCommitEdit event handler for the grid In order to ensure that all grid edits have been commited before a VM command is run, the VM must call CommitEdit on the ViewModelBase and cancel if returns false.
public BindCommitEdit ( ViewModelBase vm ) : void
vm ViewModelBase
return void

BindRowIcon() public static method

public static BindRowIcon ( Slick.Column column, string entityLogicalName ) : Slick.Column
column Slick.Column
entityLogicalName string
return Slick.Column

ColumnFormatter() public static method

public static ColumnFormatter ( int row, int cell, object value, Slick.Column columnDef, object dataContext ) : string
row int
cell int
value object
columnDef Slick.Column
dataContext object
return string

Comparer() public method

public Comparer ( object l, object r ) : int
l object
r object
return int

DataBindDataViewGrid() public method

Data Binds the standard Slick.DataView
public DataBindDataViewGrid ( DataView dataView, List columns, string gridId, string pagerId, bool editable, bool allowAddNewRow ) : Slick.Grid
dataView DataView
columns List
gridId string
pagerId string
editable bool
allowAddNewRow bool
return Slick.Grid

DataBindEvents() public method

public DataBindEvents ( Slick.Grid grid, SparkleXrm.GridEditor.DataViewBase dataView, string gridContainerDivId ) : void
grid Slick.Grid
dataView SparkleXrm.GridEditor.DataViewBase
gridContainerDivId string
return void

DataBindSelectionModel() public method

public DataBindSelectionModel ( Slick.Grid grid, SparkleXrm.GridEditor.DataViewBase dataView ) : void
grid Slick.Grid
dataView SparkleXrm.GridEditor.DataViewBase
return void

DataBindXrmGrid() public method

DataBinds a DataView that inherits from DataViewBase
public DataBindXrmGrid ( SparkleXrm.GridEditor.DataViewBase dataView, List columns, string gridId, string pagerId, bool editable, bool allowAddNewRow ) : Slick.Grid
dataView SparkleXrm.GridEditor.DataViewBase
columns List
gridId string
pagerId string
editable bool
allowAddNewRow bool
return Slick.Grid

NewColumn() public static method

public static NewColumn ( string field, string name, int width ) : Slick.Column
field string
name string
width int
return Slick.Column

ParseLayout() public static method

public static ParseLayout ( string layout ) : List
layout string
return List

RowIcon() public static method

Formattor to get the icon for a row
public static RowIcon ( int row, int cell, object value, Slick.Column columnDef, object dataContext ) : string
row int
cell int
value object
columnDef Slick.Column
dataContext object
return string

Property Details

AddCheckBoxSelectColumn public_oe property

public bool AddCheckBoxSelectColumn
return bool

MultiSelect public_oe property

public bool MultiSelect
return bool

SelectActiveRow public_oe property

public bool SelectActiveRow
return bool

ValidationPopupUseFitPosition public_oe property

public bool ValidationPopupUseFitPosition
return bool