I'm displaying print preview for selected data from the grid by using ultraPrintPreviewDialog. For this I have used initializerow event:
private void grid_InitializeRow(object sender, InitializeRowEventArgs e) { if (e.Row.Band.Layout.IsPrintLayout && (grid.Selected.Rows.Count > 0 )) { UltraGridRow gridRow = grid.GetRowFromPrintRow(e.Row); e.Row.Hidden = !gridRow.Selected; } }
Now can anyone pls let me know how can I print the selected data from the child band in hierarchical grid.
Are you asking how to print only child rows and no parent rows? There's no way to do that. You cannot print a child row without it's parent.
Maybe what you could do is create a new grid in code and bind it to a new table you create that includes only the rows you want.