BindingExtensions
Wisej.Web.Markup.BindingExtensions
Last updated
Was this helpful?
Wisej.Web.Markup.BindingExtensions
Last updated
Was this helpful?
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds extension methods to the class.
Binds a specified property of a component to a property of a data source.
TComponent
TTargetProp
The type of the target property on the component.
TSource
The type of the data source.
component
The component to bind to.
targetProp
An expression representing the target property on the component.
dataSource
The data source to bind from.
sourceProp
The name of the property on the data source to bind to.
Indicates whether formatting is enabled. Default is false
.
The value to be used when the data source value is null
. Default is null
.
The format string to apply. Default is an empty string.
An object that provides culture-specific formatting information. Default is null
.
A function to convert the data source value to the target property type. Default is null
.
A function to convert the target property value to the data source type. Default is null
.
This method allows for complex data binding scenarios where custom parsing and formatting logic is required.
Binds a specified property of a component to a data source property with optional formatting and conversion.
TComponent
TSource
The type of the data source.
component
The component to bind the property to.
targetProp
The name of the target property on the component.
dataSource
The data source to bind to.
sourceProp
The name of the property on the data source to bind to.
Indicates whether formatting is enabled. Default is false
.
The value to use when the data source property is null
. Default is null
.
The format string to apply. Default is an empty string.
The format provider to use. Default is null
.
A function to convert the data source value to the target property type. Default is null
.
A function to convert the target property value to the data source type. Default is null
.
This method is useful for simple data binding scenarios where the target property and data source property types are compatible.
TComponent
The type of the DataGridView component.
TSource
The type of the data source.
grid
The DataGridView to bind.
columnIndex
The index of the column to bind.
dataSource
The data source to bind to.
sourceProp
The property of the data source to bind to the column.
Optional. A function to parse cell values. Default is null
.
Optional. A function to format cell values. Default is null
.
This method binds a column of the DataGridView to a specified property of the data source.
TComponent
The type of the DataGridView component.
TSource
The type of the data source.
grid
The DataGridView to bind.
columnIndex
The index of the column to bind.
dataSource
The data source to bind to.
dataMember
The data member within the data source to bind to.
sourceProp
The property of the data source to bind to the column.
Optional. A function to parse cell values. Default is null
.
Optional. A function to format cell values. Default is null
.
This method binds a column of the DataGridView to a specified property of the data source, using a data member.
TComponent
The type of the DataGridView component.
TSource
The type of the data source.
grid
The DataGridView to bind.
columnName
The name of the column to bind.
dataSource
The data source to bind to.
sourceProp
The property of the data source to bind to the column.
Optional. A function to parse cell values. Default is null
.
Optional. A function to format cell values. Default is null
.
This method binds a column of the DataGridView to a specified property of the data source using the column name.
TComponent
The type of the DataGridView component.
TSource
The type of the data source.
grid
The DataGridView to bind.
columnName
The name of the column to bind.
dataSource
The data source to bind to.
dataMember
The data member within the data source to bind to.
sourceProp
The property of the data source to bind to the column.
Optional. A function to parse cell values. Default is null
.
Optional. A function to format cell values. Default is null
.
This method binds a column of the DataGridView to a specified property of the data source, using a data member and the column name.
TComponent
The type of the DataGridView component.
TSource
The type of the data source.
grid
The DataGridView to bind.
column
The DataGridViewColumn to bind.
dataSource
The data source to bind to.
sourceProp
The property of the data source to bind to the column.
Optional. A function to parse cell values. Default is null
.
Optional. A function to format cell values. Default is null
.
This method binds a DataGridViewColumn to a specified property of the data source.
TComponent
The type of the DataGridView component.
TSource
The type of the data source.
grid
The DataGridView to bind.
column
The DataGridViewColumn to bind.
dataSource
The data source to bind to.
dataMember
The data member within the data source to bind to.
sourceProp
The property of the data source to bind to the column.
Optional. A function to parse cell values. Default is null
.
Optional. A function to format cell values. Default is null
.
This method binds a DataGridViewColumn to a specified property of the data source, using a data member.
Binds a data source to a specified column in a ListView.
TComponent
The type of the ListView component.
TSource
The type of the data source.
listView
The ListView component to bind the data source to.
columnName
The name of the column to bind the data source to.
dataSource
The data source to bind.
sourceProp
The property of the data source to display in the column.
This method binds a data source to a specified column in a ListView by setting the column's display property name and assigning the data source to the ListView.
Throws:
Binds a data source to a specified column in a ListView with a specified data member.
TComponent
The type of the ListView component.
TSource
The type of the data source.
listView
The ListView component to bind the data source to.
columnName
The name of the column to bind the data source to.
dataSource
The data source to bind.
dataMember
The data member of the data source to bind.
sourceProp
The property of the data source to display in the column.
This method binds a data source to a specified column in a ListView by setting the column's display property name, assigning the data member, and then assigning the data source to the ListView.
Throws:
Binds a data source to a specified column in a ListView.
TComponent
The type of the ListView component.
TSource
The type of the data source.
listView
The ListView component to bind the data source to.
column
The column to bind the data source to.
dataSource
The data source to bind.
sourceProp
The property of the data source to display in the column.
This method binds a data source to a specified column in a ListView by setting the column's display property name and assigning the data source to the ListView.
Throws:
Binds a data source to a specified column in a ListView with a specified data member.
TComponent
The type of the ListView component.
TSource
The type of the data source.
listView
The ListView component to bind the data source to.
column
The column to bind the data source to.
dataSource
The data source to bind.
dataMember
The data member of the data source to bind.
sourceProp
The property of the data source to display in the column.
This method binds a data source to a specified column in a ListView by setting the column's display property name, assigning the data member, and then assigning the data source to the ListView.
Throws:
The type of the component, which must implement .
formattingEnabled
updateMode
Specifies when the data source is updated. Default is .
nullValue
formatString
formatProvider
parse
format
Returns: . The component with the binding applied.
The type of the component implementing .
formattingEnabled
updateMode
Specifies when the data source is updated. Default is .
nullValue
formatString
formatProvider
parse
format
Returns: . The component with the binding applied.
Binds a specified column of the to a data source.
parse
format
Returns: . The DataGridView with the specified column bound to the data source.
Binds a specified column of the to a data source with a data member.
parse
format
Returns: . The DataGridView with the specified column bound to the data source.
Binds a specified column of the to a data source using the column name.
parse
format
Returns: . The DataGridView with the specified column bound to the data source.
Binds a specified column of the to a data source with a data member using the column name.
parse
format
Returns: . The DataGridView with the specified column bound to the data source.
Binds a specified to a data source.
parse
format
Returns: . The DataGridView with the specified column bound to the data source.
Binds a specified to a data source with a data member.
parse
format
Returns: . The DataGridView with the specified column bound to the data source.
Returns: . The ListView component with the data source bound to the specified column.
Thrown when the specified column name does not exist in the ListView.
Returns: . The ListView component with the data source bound to the specified column and data member.
Thrown when the specified column name does not exist in the ListView.
Returns: . The ListView component with the data source bound to the specified column.
Thrown when the specified column is null.
Returns: . The ListView component with the data source bound to the specified column and data member.
Thrown when the specified column is null.