Created
April 9, 2024 20:01
-
-
Save bjoerntx/b951a6f14d47e8da9ba489463434b3e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Table AddMergeBlock(string tableName, DataSourceManager dataSourceManager) | |
{ | |
// get the columns of the data table | |
var columns = dataSourceManager.DataTables[tableName].Columns; | |
// list of column names | |
var columnNames = columns.Select(c => c.ColumnName).ToList(); | |
// create a new merge block info | |
MergeBlockInfo mergeBlockInfo = new MergeBlockInfo(tableName) | |
{ | |
ColumnNames = columnNames | |
}; | |
// create a new merge block settings | |
MergeBlockSettings mergeBlockSettings = new MergeBlockSettings() | |
{ | |
BlockTemplateType = BlockTemplateType.TableRow, | |
CreateHeaderRow = true | |
}; | |
// insert the merge block | |
dataSourceManager.InsertMergeBlock(textControl1, mergeBlockInfo, mergeBlockSettings); | |
return mergeBlockSettings.CreatedTable; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment