Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

Runtime table creation best practices (iterative approach)

$
0
0

This example demonstrates the differences in runtime table creation between the newest XtraReports version and its prior versions.

Please note that it is always required to call the XRTable.BeginInit and XRTable.EndInit methods if you modify XRTable.Rows and XRTableRow.Cells collections at runtime.

As for the height of a table, explicitly specify it only if cells' content is not expected to stretch the cells (e.g. this may happen when their CanGrow property is enabled).

Question Comments

Added By: DXScorpion at: 10/14/2013 3:12:53 AM    

Your sample is too simple.
In case datasource has many columns and total width of columns greater than (Report.PageWidth - Report.Margins.Left - Report.Margins.Right) How can we show all of it on report?

Added By: Leon Zeng at: 9/19/2014 5:55:49 AM    

The example works fine.  However,
(1) It's better to use gridColumn's width, caption and fieldName
(2) When dataset has more than 1 table, the cells show empty. Below line fixes it:
               cell2.DataBindings.Add("Text", null, tableName + "." + columns[i].FieldName);  
(3) Could you please show example of sumary row/column as well?
E.g., lastcol = col5 + col6 + col7,
lastRow(col5) = sum(col5), etc.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>