To reproduce: bind the grid to self reference data source, and on a button click, Fill the TableAdapter Workaround: clear the relations to clear the cache and add them back after the adapter is filled: RadGridView1.Relations.Clear() Me.Table1TableAdapter.Fill(Me.Database8DataSet.Table1) Me.RadGridView1.Relations.AddSelfReference(Me.RadGridView1.MasterTemplate, "TaskID", "ParentTask")
When RadRadioButton column is bound to a column containing integer values and RadGridView is being reenabled all radio buttons are with ToggleState.On.
If two conditional formatting objects apply to the same cell and the cell meets both conditions, the settings from both of them should apply to the cell (if they do not apply to the same property).
ADD. RadGridView - add support for sorting GridViewComboBoxColumn by Display or Value member in unbound mode.
To reproduce: - Add default values for all cells in the grid. - Try to add the new row without changing any value. Workaround: private void RadGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e) { var editor = radGridView1.ActiveEditor as BaseInputEditor; var field = editor.GetType().GetField("originalValue", BindingFlags.NonPublic | BindingFlags.Instance); field.SetValue(editor, "asd"); }
If you delete rows of the active view in tabbed child hierarchy, the new tab should be selected and the old tab should become invisible.
Currently the Contains operation considers the property value, but operators like Equals doesn't.
In this scenario, the RadGridView.DataSource property is set to Microsoft.EntityFrameworkCore.ChangeTracking.ObservableCollectionListSource. When the RadGridView.Rows.Remove() method is called an IndexOutOfRange exception is thrown.
The used RadGridView BindingSource is bind to another instance of BindingSource in this case
To reproduce: - Add a checkbox column to a grid - Add the following code to the ValueChanged event: void radGridView1_ValueChanged(object sender, EventArgs e) { if (radGridView1.CurrentColumn.Name == "BoolColumn") {
To reproduce: 1.Set the column AutoCompleteMode to suggest 2. Type a letter which does not exist in the records (if you have A, B, and C, use D) 3. Press escape 4. Type in another letter which does not exist => the exception is thrown The GridRowBehavior is trying to access the AutoCompleteAppend of the element, which is null, while we are in Suggest mode.
Workaround: handle the GridViewPdfExport.CellFormatting event and apply the column`s format string Public Class Form1 Sub New() InitializeComponent() Me.RadGridView1.DataSource = Me.GetData() Me.RadGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill Dim decimalColumn = DirectCast(Me.RadGridView1.Columns("Money"), GridViewDecimalColumn) decimalColumn.DecimalPlaces = 0 decimalColumn.FormatString = "{0:C0}" Dim dateTimeColumn = DirectCast(Me.RadGridView1.Columns("Date"), GridViewDateTimeColumn) dateTimeColumn.FormatString = "{0:D}" End Sub Private Function GetData() As Object Dim dataTable As New DataTable() dataTable.Columns.Add("Id", GetType(Integer)) dataTable.Columns.Add("Name", GetType(String)) dataTable.Columns.Add("Money", GetType(Decimal)) dataTable.Columns.Add("Date", GetType(DateTime)) For i As Integer = 0 To 999 dataTable.Rows.Add(i, "Name " & i, i * 10, DateTime.Now.AddDays(i)) Next Return dataTable End Function Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click Dim pdfExporter = New GridViewPdfExport(Me.RadGridView1) AddHandler pdfExporter.CellFormatting, AddressOf pdfExporter_CellFormatting Dim renderer = New PdfExportRenderer() Dim fileName As String = "..\..\exported-grid.pdf" pdfExporter.RunExport(fileName, renderer) End Sub Private Sub pdfExporter_CellFormatting(sender As Object, e As PdfExportCellFormattingEventArgs) If e.RowIndex > -1 Then e.CellElement.Text = TryCast(RadDataConverter.Instance.Format(e.Row.Cells(e.ColumnIndex).Value, GetType(String), e.Column), String) End If End Sub End Class
To reproduce: - Bind the grid to an object that contains enum property. - Save the layout - Restart the application and load the layout before setting the DataSource of the grid. Workaround: Load the layout after the DataSource is set.
Description: if you filter a text column with "Does not contains" operator, the produced FilterDescriptors.Expression is "ProductName NOT LIKE '%c%' OR ProductName IS NULL". However, if you try to programmatically add this expression to the RadGridView.FilterDescriptors.Expression property it doesn't filter the grid. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.ProductsTableAdapter.Fill(Me.NwindDataSet.Products) Me.RadGridView1.EnableFiltering = True End Sub Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click Me.RadGridView1.FilterDescriptors.Expression = "ProductName NOT LIKE '%c%' OR ProductName IS NULL" End Sub Workaround: don't set expression but add a FilterDescriptor: http://docs.telerik.com/devtools/winforms/gridview/filtering/setting-filters-programmatically-(simple-descriptors) Dim filter1 As New FilterDescriptor() filter1.[Operator] = FilterOperator.NotContains filter1.Value = "c" filter1.IsFilterEditor = True filter1.PropertyName = "ProductName" Me.RadGridView1.FilterDescriptors.Add(filter1)
FIX. RadGridView - when AlternatingRowColors is enabled and the grid is sorted the colorized rows are wrong.
Workaround: AddHandler Me.RadGridView1.CreateCompositeFilterDialog, AddressOf CreateCompositeFilterDialog Private Sub CreateCompositeFilterDialog(sender As Object, e As GridViewCreateCompositeFilterDialogEventArgs) Dim dialog As New CompositeDataFilterForm() AddHandler dialog.DataFilter.EditorRequired, AddressOf EditorRequired e.Dialog = dialog End Sub Private Sub EditorRequired(sender As Object, e As TreeNodeEditorRequiredEventArgs) Dim filterNode As DataFilterCriteriaNode = TryCast(e.Node, DataFilterCriteriaNode) If filterNode IsNot Nothing AndAlso filterNode.PropertyName = "BASE_NULL_DATE" AndAlso TypeOf sender Is DataFilterValueEditorElement Then e.Editor = New TreeViewDateTimeEditor() End If End Sub
If you have a cell with value "some date 12:00:00" (12:00:00PM), and you filter the column with: - Equals "same date 00:00:00" (12:00:00 AM) it shows the PM result (even though the time is different) - Greater - does not show the PM result and it should
1) When the grid first loads, the top-left most cell is automatically selected. Before clicking anywhere within the grid view, if you hold SHIFT and click the cell to the right of the selected, the following exception is thrown. 2) You can get around the above exception by clicking a different cell in the grid view before performing a SHIFT select or CTRL+C operation is performed against the grid view. If you select a different cell, and then perform a SHIFT selection to a cell in a different column, you will experience the "An entry with the same key already exists." exception
Workaround: set the Position of the current item of the BindingSource in the CurrentRowChanged event of RadGridView: void rgvInvoices_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e) { int index = bsInvoices.IndexOf(e.CurrentRow.DataBoundItem) ; bsInvoices.Position = index; }
To reproduce: Dim dockmem As New MemoryStream Dim gridmem As New MemoryStream Public Sub SetData() ' dgvSelectList.DataSource = Nothing Dim dt As DataTable dt = New DataTable dt.Columns.Add("VENDCODE") dt.Columns.Add("VENDNAME") dt.Rows.Add("AA2", "Arthur") dt.Rows.Add("AA2", "Arthur") dgvSelectList.DataSource = dt dgvSelectList.BestFitColumns() End Sub Private Sub frmSelectListNG2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load SetData() dgvSelectList.EnableFiltering = False 'Save Grid and Dock layout settings to mem stream and simulate my process SaveSettings() End Sub Public Sub btnGO_Click(sender As System.Object, e As System.EventArgs) Handles btnGO.Click LoadSettings() dgvSelectList.SplitMode = RadGridViewSplitMode.Horizontal SetData() LoadSettings() End Sub Private Sub LoadSettings() gridmem.Position = 0 dockmem.Position = 0 dgvSelectList.LoadLayout(gridmem) rdkSelect.LoadFromXml(dockmem) End Sub Private Sub SaveSettings() gridmem.Position = 0 dockmem.Position = 0 dgvSelectList.SaveLayout(gridmem) rdkSelect.SaveToXml(dockmem) End Sub Workaround - set the datasource to Nothing prior rebinding