Hi,
Print preview only displays the structures that are visible to the user without scrolling down to the end of the rows displayed in ultrawingrid. If we scroll though all the records displayed in the ultrawingrid then the print preview displays all the structures otherwise it will display only the structures available on screen(This is only happening with chemical structure) all other columns are displayed fine for each row in print preview. I want to know if there is any limitation which might be causing this. If not how to avoid this.
Thanks
Jogi
Hi Jogi,
What is the DataSource of your grid?
My guess is that either this if a bug in a very old version of the grid (what version are you using)? Or else it's an issue with your data source. maybe your data source is doing some sort of paging where it doesn't load all of the data until the row is requested and so that's why it works once you've scrolled to the bottom of the grid.
Hi Mike,
we are using dataset for binding, using 8.2 version. we are only unable to see the values of the Base64_cdx column all the other columns for each row is displayed fine mike. This only happens with the column mentioned above with structures in the print preview.. All other columns are displayed even with out scrolling through each row of the grid. I have attached a image of the print preview for more clear understanding.
Hello Jogi,
Please attach an isolated sample that reproduces this behavior. I can then upgrade it to our latest version to test if the behavior has been addressed in a service release or not.
Hi Mike /Micheal,
As you said i checked my code and found when ever we navigate through the records we re binding the ultrawingrid to a binding source in order to show the records. At this point my question is when we initialize the rows the code that is used is
//if the layout is for printing or exporting get if (e.Row.Band.Layout.IsPrintLayout) { ChemDataGrid cd_grid = sender as ChemDataGrid; //since the ultragrid doesn't carry the selected state of a row to the print or export you have to find the real row that is //being displayed to the user Infragistics.Win.UltraWinGrid.UltraGridRow realGridRow = cd_grid.GetRowFromPrintRow(e.Row); //hide the row that is being used for printing/exporting so it doesn't show up if (!showAllRows) e.Row.Hidden = !realGridRow.Selected; }
This code will only select the rows that are displayed to the user/ rows selected by the user.. so how can i display all the records in the ultrawingrid to print /export irrespective of the user selection. Is there any specific way to code this inorder to make sure all the rows in ultrawingrid are displayed in print preview. And also even when all the rows are displayed in print preview after scrolling through all the records in the ultrawingrid the print is not displaying the structures..is this related to the above code?
It's still a bit unclear how the data is loaded in your grid. Are you peforming a load on demand type of functionality where the user scrolls to trigger more rows to appear? If this correct then I have to agree with Mike and that the behavior you are encountering is expected because not all the data is present in the grid at the time you are print previewing.