Can't find what you're looking for?

Contact us or post in our forums and we'll help you find an answer.

Print/preview selected rows in C1TrueDBGrid


How to print/preview selected rows in TrueDBGrid

Steps to Complete:

1. Create a new TrueDBGrid and add it to the form.

C1TrueDBGrid tdb = new C1TrueDBGrid();
tdb.Visible = false;

2. Add selected Rows to the new TrueDBGrid.

for (int c = 0; c < c1TrueDBGrid1.Columns.Count; c++)
tdb.Columns.Add(new C1DataColumn(c1TrueDBGrid1.Columns[c].Caption, c1TrueDBGrid1.Columns[c].DataType));


for (int r = 0; r < c1TrueDBGrid1.SelectedRows.Count; r++)
DataRow dr;
dr = ((c1TrueDBGrid1.DataSource as DataTable).Rows[c1TrueDBGrid1.SelectedRows[r]]);

3. Preview that new TrueDBGrid.

Get the Latest Version of WinForms Edition
Download the Free Trial Now