Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created April 9, 2024 20:04
Show Gist options
  • Save bjoerntx/709ec4e1749a56d879932f94f9d7101e to your computer and use it in GitHub Desktop.
Save bjoerntx/709ec4e1749a56d879932f94f9d7101e to your computer and use it in GitHub Desktop.
// load JSON data
var jsonData = File.ReadAllText("JsonModel.json");
// create a new DataSourceManager
DataSourceManager dataSourceManager1 = new DataSourceManager();
dataSourceManager1.LoadJson(jsonData);
var table = AddMergeBlock("mergeBlock1", dataSourceManager1);
TableStyle tableStyle = new TableStyle()
{
TableRowFormat = new TXTextControl.TableCellFormat()
{
BottomBorderWidth = 1,
TopBorderWidth = 1,
LeftBorderWidth = 1,
RightBorderWidth = 1,
BottomTextDistance = 100,
TopTextDistance = 100,
LeftTextDistance = 100,
RightTextDistance = 100
},
HeaderRowFormat = new TXTextControl.TableCellFormat()
{
BackColor = Color.DeepPink,
BottomBorderWidth = 1,
TopBorderWidth = 1,
LeftBorderWidth = 1,
RightBorderWidth = 1,
BottomTextDistance = 200,
TopTextDistance = 200,
LeftTextDistance = 100,
RightTextDistance = 100
}
};
ClearTableStyle(table, textControl1);
ApplyTableStyle(table, tableStyle);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment