Unplanned
Last Updated: 24 Oct 2018 13:26 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Feature Request
8
The scenario which should be covered is selecting some data from Excel and pasting in the new row of RadGridView. This is an easy way for inserting data in the grid.
Unplanned
Last Updated: 15 Oct 2018 10:53 by ADMIN
To reproduce: run the attached sample project and activate the editor for the cell. You will notice that the row's height is now adjusted and single line text is displayed. It seems that the issue occurs because of the set Font property of the grid.

Workaround:  
        private void RadGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
        {
            e.Row.MinHeight = e.Row.Height + 3;
            RadTextBoxEditor tbEditor = e.ActiveEditor as RadTextBoxEditor;
            if (tbEditor != null)
            {
                tbEditor.Multiline = true;
            }
        }

        private void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
        {
            e.Row.MinHeight = 0; 
        }
Unplanned
Last Updated: 15 Oct 2018 10:35 by ADMIN
A possible workaround is to use the following KB and change how it is implemented to iterate the MasterTemplate.Rows collection instead of the ViewInfo.Rows collection

https://www.telerik.com/support/kb/winforms/gridview/details/add-check-all-in-the-header-cell-for-a-gridviewcheckboxcolumn
Unplanned
Last Updated: 21 Sep 2018 08:40 by ADMIN
After populating the RadGridView, unbound in this example, I use RadGridView1.ClearSelection. This works when using some themes such as Crystal and Office2013, but not others, like Fluent. See attached..... believe me that the code is EXACTLY the same for each, just the application theme is difference. This should be an easy one to replicate.
Unplanned
Last Updated: 06 Jul 2018 12:54 by Baracskai
Created by: Baracskai
Comments: 0
Category: GridView
Type: Feature Request
0
Hello,

Please create a GridViewDateTimeOffsetColumn to support DateTimeOffset type.
A datetimeoffset editor would be good and support of nullable date types.

Thank you!
Unplanned
Last Updated: 04 Jul 2018 11:38 by ADMIN
To reproduce: please refer to the attached sample project and gif file.

Workaround: add the column programmatically, not at design time.
Unplanned
Last Updated: 02 Jul 2018 15:09 by Dimitar
Unplanned
Last Updated: 26 Jun 2018 10:00 by ADMIN
To reproduce:
- Create a self reference grid and set the columns width so the horizontal scrollbar is visible. 
- Scroll to the right and filter by the last column,
- Type a single character, the the edited cell is now changed. 

Workaround:
class MyFilterCell : GridFilterCellElement
{
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(GridFilterCellElement);
        }
    }

    public MyFilterCell(GridViewDataColumn column, GridRowElement row) : base(column, row)
    {
        
    }
    public override bool IsCompatible(GridViewColumn data, object context)
    {
        return false;
    }
}

Unplanned
Last Updated: 26 Jun 2018 09:36 by ADMIN
Use attached to reproduce.


Workaround: 

this.LoadFieldList(hiddenGrid.MasterTemplate);
this.FieldList.Add(new Telerik.Data.Expressions.ExpressionItem()
{ Name = "Test", Description = "Test", Syntax = "Test", Type = Telerik.Data.Expressions.ExpressionItemType.Field, Value = "Test" });

Unplanned
Last Updated: 26 Jun 2018 09:31 by ADMIN
Use attached to reproduce.
- Use a 125% and 150% monitor for reproducing.
- This should be tested on Windows 10 1803 (Spring Update) as well.

Workaround:
private void RadGridView1_ColumnChooserCreated(object sender, Telerik.WinControls.UI.ColumnChooserCreatedEventArgs e)
{
    e.ColumnChooser = new MyColumnChooser(this.radGridView1.MasterTemplate, radGridView1.GridViewElement);
}

public partial class MyColumnChooser : GridViewColumnChooser
{
    public MyColumnChooser()
    {
        InitializeComponent();
    }
    public MyColumnChooser(GridViewTemplate template, RadGridViewElement rootElement) : base(template, rootElement)
    {
    }
    SizeF oldDpi = new SizeF(1, 1);
    protected override void HandleDpiChanged()
    {

        base.HandleDpiChanged();
        SizeF descale = new SizeF(1f / this.FormElement.DpiScaleFactor.Width, 1f / this.FormElement.DpiScaleFactor.Height);
        this.Scale(descale);
        var dpi = NativeMethods.GetMonitorDpi(Screen.FromRectangle(this.Bounds), NativeMethods.DpiType.Effective);
        if (oldDpi != dpi)
        {
            SizeF sz = new SizeF(dpi.Width / oldDpi.Width, dpi.Height / oldDpi.Height);
       
            this.Scale(dpi);
        }

        oldDpi = dpi;
    }
   
}
Unplanned
Last Updated: 26 Jun 2018 08:20 by ADMIN

Please refer to the attached sample project and follow the steps illustrated in the gif file. Note: the same behavior is observed with the CellValidating event in the new row. Workaround: use the RowValidating event instead: private void radGridView1_RowValidating(object sender, Telerik.WinControls.UI.RowValidatingEventArgs e) { if (e.Row is Telerik.WinControls.UI.GridViewNewRowInfo && e.Row.Cells["Id"].Value == null) { this.radGridView1.MasterView.TableAddNewRow.CancelAddNewRow(); this.radGridView1.CurrentRow = this.radGridView1.MasterView.TableAddNewRow; } }

 

NOTE: The CellValidating event is fired multiple times as well when you select a new tab in RadDock. There is a second project attached.

Unplanned
Last Updated: 21 Jun 2018 14:39 by ADMIN
To reproduce:
private void radButton1_Click(object sender, EventArgs e)
{
    radGridView1.MasterView.TableSearchRow.SelectNextSearchResult();

}
Check the index in the search textbox, it is not updated. 

Workaround:
var cell = radGridView1.TableElement.FindDescendant<GridSearchCellElement>();
if (cell != null)
{
    cell.FindNextButton.PerformClick();
}
Unplanned
Last Updated: 20 Apr 2018 07:31 by ADMIN
To reproduce: run the attached sample project. 

Type "chef" in the search box and then try to sort some of the columns. Click the header cell several times and as a result the exception will occur.

Workaround:

        public class CustomGrid : RadGridView
        {
            public new object DataSource
            { 
                get
                {
                    return (object)base.DataSource;
                }
                set
                {
                    GridViewSearchRowInfo.Cancel = true;
                    Thread.Sleep(100);
                    base.DataSource = null;
                    this.EnableFiltering = false;
                    base.DataSource = value;
                    this.EnableFiltering = true;
                    base.CurrentRow = null; 
                }
            }
        }
Unplanned
Last Updated: 19 Apr 2018 12:30 by ADMIN
Unplanned
Last Updated: 16 Apr 2018 13:46 by ADMIN
How to reproduce: Create a DPI-aware application and run it on a Windows 10 machine on 125%, the text inside the editors is smaller compared to the text in cells which are not in edit mode.

Workaround: 
private void RadGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    BaseInputEditor editor = e.ActiveEditor as BaseInputEditor;

    if (editor != null)
    {
        RadTextBoxItem item = editor.EditorElement.FindDescendant<RadTextBoxItem>();

        if (item != null)
        {
            item.HostedControl.Font = this.radGridView1.GridViewElement.GetScaledFont(this.radGridView1.GridViewElement.DpiScaleFactor.Height);
        }
    }
} 
Unplanned
Last Updated: 26 Mar 2018 11:38 by ADMIN
Use attached project to reproduce!

Another case is when the font size is changed from the settings dialog - in this case, the row height is not adjusted.

Workaround:
Use the following custom print style:

class MyTableViewDefinitionPrintRenderer : TableViewDefinitionPrintRenderer
{
    public MyTableViewDefinitionPrintRenderer(RadGridView grid) : base(grid)
    {

    }
    protected override int GetDataRowHeight(GridViewRowInfo row, TableViewRowLayoutBase rowLayout)
    {
        int result = base.GetDataRowHeight(row, rowLayout);

        int newHeight = 0;

        if (!(row is GridViewGroupRowInfo))
        {
            foreach (GridViewColumn col in row.ViewTemplate.Columns)
            {
                if (col is GridViewRowHeaderColumn || col is GridViewIndentColumn || !col.IsVisible)
                {
                    continue;
                }

                string value = row.Cells[col.Name].Value.ToString();

                TableViewCellArrangeInfo info = ((TableViewRowLayout)rowLayout).LayoutImpl.GetArrangeInfo(col);
                float cellWidth = (float)info.CachedWidth;
                int currentHeight = TextRenderer.MeasureText(value, this.GridView.PrintStyle.CellFont, new Size((int)cellWidth, 0), TextFormatFlags.WordBreak).Height + this.GridView.Font.Height *4;

                newHeight = Math.Max(newHeight, currentHeight);

            }
        }


        return Math.Max(newHeight, result); 
    }
}
class MyPrintStyle :GridPrintStyle
{
    protected override BaseGridPrintRenderer InitializePrintRenderer(RadGridView grid)
    {
        return new MyTableViewDefinitionPrintRenderer(grid);
    }
}
Unplanned
Last Updated: 20 Mar 2018 08:30 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
1
To reproduce:  run the attached sample project and click the 'export' button. The exported file fill be automatically opened. If you select several cells from the UnitPrice column you will see at the bottom that the cell values ' total is displayed. However, if you include  the summary item's value in the selection its value is not taken into consideration.  If you pay attention to the cell's format, it will be General instead of custom numeric one.

Workaround: 

    Private Sub spreadExporter_CellFormatting(sender As Object, e As Telerik.WinControls.Export.CellFormattingEventArgs)
        If e.GridRowInfoType = GetType(GridViewSummaryRowInfo) AndAlso e.GridCellInfo.ColumnInfo.Name = "DecimalColumn" Then
            Dim cellSelection As CellSelection = TryCast(e.CellSelection, CellSelection)
            Dim cellFormat As New CellValueFormat("### ### ###.00")
            If cellFormat IsNot Nothing Then
                cellSelection.SetValue(Decimal.Parse(cellSelection.GetValue().Value.RawValue.Replace(" ", "")))
                cellSelection.SetFormat(cellFormat)
            End If 
        End If 
    End Sub
Unplanned
Last Updated: 07 Mar 2018 14:41 by erwin
Workaround: adjust the cell/row spacing

        this.radGridView1.TableElement.CellSpacing = -2;
        this.radGridView1.TableElement.RowSpacing = -2;
Unplanned
Last Updated: 02 Mar 2018 14:19 by ADMIN
To reproduce: run the attached sample project and press the "stream export" button. 

Workaround: use the GridViewSpreadExport https://docs.telerik.com/devtools/winforms/gridview/exporting-data/spread-export

        Dim spreadExporter As GridViewSpreadExport = New GridViewSpreadExport(RadGridView1)
        Dim exportRenderer As New SpreadExportRenderer()
        Dim fileName As String = "..\..\Export" & DateTime.Now.ToLongTimeString().Replace(":", "_") + ".xlsx"
        spreadExporter.RunExport(fileName, exportRenderer)