...
Description |
---|
Excerpt |
---|
Sets a row's |
...
data |
...
source |
...
to |
...
an |
...
|
...
|
...
IDictionary represents a collection of key-and-value |
...
pairs. |
...
When binding an IDictionary horizontally, you must insert a datamarker for each value you want displayed. |
Signature | ||||
---|---|---|---|---|
| ||||
public virtual void BindRowData(System.Collections.IDictionary dataSource, System.String dataSourceName, DataBindingProperties property)
{signature}{signature: |
Signature | ||||||
---|---|---|---|---|---|---|
| }
| |||||
Public Overridable Sub BindRowData(ByVal dataSource As System.Collections.IDictionary, ByVal dataSourceName As String, ByVal [property] As DataBindingProperties)
{signature}
{parameters}
{param:dataSource}An {{IDictionary}} collection of key\-and\-value pairs to use as the data source.{param}
{param:dataSourceName}The name of the data marker at which to insert the values imported from the data source. For example, to bind a data source to the data marker \%\% |
Parameters |
---|
Param | ||||
---|---|---|---|---|
| ||||
An |
Param | ||||
---|---|---|---|---|
| ||||
The name of the data marker at which to insert the values imported from the data source. For example, to bind a data source to the data marker %%=Orders.OrderId, the value of dataSourceName should be "Orders". The string passed must begin with a letter. {param} {param:property}The [DataBindingProperties|DataBindingProperties] object which contains information about how the data should be bound to the template. {{property}} Must be specified, but the {{DataBindingProperties}} need not be set beforehand. To bind data to a template with the default {{DataBindingProperties}}, pass in {{ExcelTemplate.CreateDataBindingProperties()}} as the {{property}} value. Otherwise, use the {{ExcelTemplate.CreateDataBindingProperties()}} method to generate a new {{DataBindingProperties}} object and set the [DataBindingProperties.MaxRows|DataBindingProperties.MaxRows], [DataBindingProperties.Transpose|DataBindingProperties.Transpose], and/or [DataBindingProperties.WorksheetName|DataBindingProperties.WorksheetName] properties for the workbook.{param} {exceptions} {exception:ArgumentNullException}{{BindRowData}} will throw this exception if {{null}} \(C\#\) or {{Nothing}} \(VB.NET\) is passed to the method.{exception} {exception:ArgumentException}{exception} {remarks}You can set several data sources for a single template. Use the following methods to set template data sources: [BindCellData|ExcelTemplate.BindCellData(Object, String, DataBindingProperties)], [BindColumnData|ExcelTemplate.BindColumnData],[BindRowData|ExcelTemplate.BindRowData], and [BindData|ExcelTemplate.BindData]. {remarks} {example}{code:csharp|title=C#} |
Param | ||||
---|---|---|---|---|
| ||||
The DataBindingProperties object which contains information about how the data should be bound to the template. |
Exceptions |
---|
Exception | ||||
---|---|---|---|---|
| ||||
|
Exception | ||||
---|---|---|---|---|
| ||||
Remarks |
---|
You can set several data sources for a single template. Use the following methods to set template data sources: BindCellData, BindColumnData,BindRowData, and BindData. |
Example | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|