Posted 11 July 2018, 7:44 pm EST
I have a C1TrueDbgrid v4 instance in a .NET form (C#). In design I created two columns with the following caption: ID and Name.
The first column is invisible and the second one is visible.
Then in the Form1_Load event I have the following code:
dt = new DataTable(); dt.Columns.Add(); dt.Columns.Add(); dt.Rows.Add(new object[] { "1","John Smith"}); dt.Rows.Add(new object[] { "2", "Jane Smith" }); dt.Rows.Add(new object[] { "3", "Mike B." }); dt.Rows.Add(new object[] { "3", "Jenna Z." }); c1TrueDBGrid1.DataSource = null; c1TrueDBGrid1.SetDataBinding(dt, "", true);
When I run the application, the grid shows 4 empty records under the “Name” column. No data is displayed.
If I set the third parameter to false in SetDataBinding method, the data is displayed but layout is not preserved.
I read your tutorials and created this sample code but the result is not the expected.
Is there something else I need to do?