You can also note it in demo application with this settings:
If you define which columns to be printed on separate pages and try to use the Print Settings dialog to change the orientation for example, the multi-page printing gets lost:
Here is the code snippet which result is illustrated in the attached gif file:
Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.CustomersTableAdapter.Fill(Me.NwindDataSet.Customers)
Me.RadGridView1.DataSource = Me.CustomersBindingSource
Me.RadGridView1.BestFitColumns()
End Sub
Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
Dim document As New RadPrintDocument()
document.AssociatedObject = Me.RadGridView1
Dim printStyle As GridPrintStyle = New GridPrintStyle(RadGridView1)
Dim renderer As TableViewDefinitionPrintRenderer = New TableViewDefinitionPrintRenderer(RadGridView1)
renderer.PrintPages.Add(RadGridView1.Columns(0), RadGridView1.Columns(2), RadGridView1.Columns(5))
renderer.PrintPages.Add(RadGridView1.Columns(0), RadGridView1.Columns(1), RadGridView1.Columns(9))
renderer.PrintPages.Add(RadGridView1.Columns(8), RadGridView1.Columns(7))
renderer.PrintPages.Add(RadGridView1.Columns(3), RadGridView1.Columns(4), RadGridView1.Columns(6))
printStyle.PrintRenderer = renderer
RadGridView1.PrintStyle = printStyle
Dim dialog As New RadPrintPreviewDialog(document)
dialog.ShowDialog()
End Sub
To reproduce:
1. Bind a RadGridView to the Northwind.Products table
2. Enable the header checkbox for the Discontinued column
3. Set the ReadOnly property either for the grid or for the specific column.
The header checkbox is not allowed to be toggled. However, you can toggle/untoggle it which affects all the data rows.
Currently, due to the specificity of the internal implementation for this scrolling behavior, the possible solution that I can suggest is to hide the row header by setting the ShowRowHeaderColumn property to false.
this.radGridView1.ShowRowHeaderColumn = false;
To reproduce:
1. Expand a parent row in hierarchical grid.
2. Click on the second tab
3. If the child grid doesn't have any rows, the CurrentViewChanged event will not fire.
Hello,
We are experiencing a strange behaviour of RadGridView set as a self referencing hierarchy when used with Excel filters.
Once we use predefined filter values (both, build-in and custom defined by us) the filter icon is highlitghted when none of the filter is marked. This higlight can be removed when clear filters button of filter popup is used or FilterDescriptors are cleared. If we do not clear the filters manually, and, for instance, sort grid column the application crashes with internal error of the grid. Error reads Object reference not set to an instance of object.
Attached movie will explain it better. I have also attached a ver simple sample project with data (which does not make sense, just for visualisation) that should fail when you repeat steps described above (turn today or last 7 days filter, apply, select no filter, apply and try to sort the same column).
Is there a workaround or specific conditions we need to apply to have it working?
Thanks for your advice.
I'm also attaching errors details:
001.png: On the GridViewComboBoxColumn how do I prevent the drop down from covering the input cell when grid is at the bottom of the screen's viewable area?
I've tried setting the position and location under the CellEditorInitialized event, but had no luck.
private void RadGridARCashReceipt_CellEditorInitialized(object sender, GridViewCellEventArgs e)
Hi Telerik Teams,
I have a problem,When I filter data in gridview, a RadForm appears. But there are problems with the margins of its 2 buttons. How can I deal with it?
Thanks
Mason Chiu
Hi,
Please refer to 2 attached files...
The 'April 2020' file is correct - The yellow color is shown upon setting a filter (Release 2020.1.113.40)
The 'June 2020' file is incorrect - No color is shown indicating filter is set. (Release 2020.2.512.40)
The code sets FilterDescriptor on the 'A PARTY' column.
There is change in the icon of the filter as well :(
When RadGridView is bound to a collection of 60 000 records the difference in the sorting time between using a ProBindingSource and a DataTable is massive. Changes in any core logic in both internal implementations, RadGridView and ProBindingSource, isn't so easy as it looks. Both products have been for a very long time on the market designed to cover the main scenarios of the target customers groups for which they are developed.
By default, if the rows count is less than 10 000 we use quick sort to order the items in the grid. If there are more items we use Red-Black tree. This is controlled by the UseHybridIndex property.
(radGridView.MasterTemplate.ListSource.CollectionView as GridDataView).UseHybridIndex = false;
However, both of algorithms use non-linear data access. If the ProBindingSource is not optimized to get data not linearly, the performance wouldn't be satisfactory.
That is why we have introduced the BypassSort functionality to cover this case after cooperation with the OE developers. Thus, our RadGridView won't perform any logic for sorting and the whole time necessary for sorting will depend on the DataSource itself (ProBindingSource in your case) and how this collection sorts its items: https://docs.telerik.com/devtools/winforms/controls/gridview/sorting/basic-sorting
In the current version of Telerik UI for WinForms suite, the BypassSort property is ignored if the BypassFilter is not set to true as well. Hence, the sorting will be still slow.
Both properties shouldn't affect each other and if a developer wants to improve only the sorting performance, it is expected to enable only the ByPassSort property.
Hi,
Please check the attached sample project.
I think CompositeFilter does not respect CaseSensitive property.
Thanks
Good afternoon,
I was wondering if anyone could help me with a GridView export issue I am having.
I am populating a GridView from an SQL query. This table has two DateTime columns that I am formatting after the DataBindingComplete to show the milliseconds portion of the DateTime field like so:
private
void
dgvTransTable_DataBindingComplete(
object
sender, GridViewBindingCompleteEventArgs e)
{
for
(
int
j = 0; j <
this
.dgvTransTable.Columns.Count; j++)
{
if
(
this
.dgvTransTable.Columns[j].GetType() ==
typeof
(Telerik.WinControls.UI.GridViewDateTimeColumn))
{
((GridViewDateTimeColumn)
this
.dgvTransTable.Columns[j]).FormatString =
"{0:MM/dd/yyyy hh:mm:ss.fff}"
;
}
}
}
Works great. Column displays just like I want. Now the problem is with the Excel Export. Normally with the format cell options, you can use .000 for milliseconds. I just can't seem to get it correct with the GridViewSpreadExport. This is what I am trying, note I've also tried using the .fff but it both cases, all that is written to the Excel cell is the short date/time string, and the formatting looks like I want, except either just the literal .fff or .000 show up in the visual cell.
I'd even be happy if someone knows how to make this field export as a straight text field as long as the string is formatted like the gridview cell.
foreach
( GridViewDataColumn col
in
dgvTransTable.Columns )
{
switch
( col.DataType.Name )
{
case
nameof(DateTime):
col.ExcelExportType = Telerik.WinControls.UI.Export.DisplayFormatType.Custom;
col.ExcelExportFormatString =
"MM/dd/yyyy hh:mm:ss.000"
;
break
;
}
}