Current filter:
                                You should refresh the page.
                                0
                                  • I haven't been able to print the vertical grid either through a print component link or using the vgrid's .print method. The attached project opens a table from XML data and populates an XtraGrid and a vertical grid. As I scroll down the XtraGrid, the data in the vertical grid (which is in singlerecord mode) changes correctly, but when I preview the grid by clicking the Print button, the record displayed is always the one at the top of the grid and never changes. Can you tell me please how to make the preview/print work with the data displayed, rather than the first record in the table?

                                    Thanks

                                    Kathleen Jordan

                                TestVGrid.zip
                                0

                                Hi Kathleen,

                                Thank you for the sample.
                                I see the issue. Most likely it's a bug in the current version of the suite.
                                So, I'll convert your question to a bug thread. Our developers will examine it and do our best to find a solution for this problem.

                                Thanks,
                                Andrew

                                0

                                Thanks Andrew. After posting the question, I had a look at the Demo app for the vertical grid thinking there might be a print example there. I ran the demo and clicked the Export/Print button and selected the Print Preview option, and found that it behaves in the same way as the attached so figured it was maybe a bug.

                                As a workaround in the meantime (in case anybody else is having the same problem) I've changed the Preview and Print menu options in my app so that they copy the current row to a single record table and print a second, hidden vertical grid on the fly using code along the lines of:

                                DataTable tbl = ds.Tables[0].Clone();
                                DataRow row = gridView1.GetDataRow(gridView1.FocusedRowHandle);
                                tbl.ImportRow(row);
                                vg2.DataSource = tbl;
                                vg2.RowHeaderWidth = vgX.RowHeaderWidth;
                                vg2.ShowPrintPreview();

                                0

                                Question answered

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.