Completed
Last Updated: 12 Jul 2017 14:06 by ADMIN
Completed
Last Updated: 15 Aug 2017 10:29 by ADMIN
ADMIN
Created by: Hristo
Comments: 1
Category: Map
Type: Feature Request
1

			
Completed
Last Updated: 15 Aug 2017 10:28 by ADMIN
Completed
Last Updated: 12 Feb 2018 09:12 by Don
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
Completed
Last Updated: 16 Feb 2017 15:06 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: DataFilter
Type: Feature Request
1
Workaround: 
public RadForm1()
{ 
    InitializeComponent();

    this.radDataFilter1.NodeFormatting += radDataFilter1_NodeFormatting;
    this.radDataFilter1.Editing += radDataFilter1_Editing;
}

private void radDataFilter1_Editing(object sender, TreeNodeEditingEventArgs e)
{
    e.Cancel = e.Editor is DataFilterCheckboxEditor;
}

private void radDataFilter1_NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
{
    DataFilterCriteriaElement nodeElement = e.NodeElement as DataFilterCriteriaElement;
    if (nodeElement != null)
    {
        nodeElement.ValueElement.DrawText = true;
        if (nodeElement.ValueElement.Children.Count == 0)
        {
            if (nodeElement.FieldElement.Text == "Discontinued")
            {
                RadCheckBoxElement checkBox = new RadCheckBoxElement();
                nodeElement.ValueElement.Children.Add(checkBox);
                checkBox.Alignment = ContentAlignment.MiddleCenter;
                checkBox.CheckStateChanged += checkBox_CheckStateChanged;
                checkBox.StretchHorizontally = false;
                nodeElement.ValueElement.DrawText = false;
            }
        }
        else
        {
            RadCheckBoxElement checkBox = nodeElement.ValueElement.FindDescendant<RadCheckBoxElement>();
            if (checkBox != null && nodeElement.FieldElement.Text != "Discontinued")
            {
                nodeElement.ValueElement.Children.Remove(checkBox);
            }
            else
            {
                nodeElement.ValueElement.DrawText = false;
            }
        }
    }
}

private void checkBox_CheckStateChanged(object sender, EventArgs e)
{
    RadCheckBoxElement checkBox = sender as RadCheckBoxElement;
    DataFilterCriteriaElement criteriElement = checkBox.Parent.FindAncestor<DataFilterCriteriaElement>();
    criteriElement.CriteriaNode.Descriptor.Value = checkBox.IsChecked;
}
Completed
Last Updated: 16 Feb 2017 16:59 by ADMIN
The API should also provide functionality for setting a default operator to each of the descriptor items.
Completed
Last Updated: 16 Feb 2017 15:35 by ADMIN
Add Item that has a DropDownListEditor for the value part.
In addition, the value element should display the value from the DisplayMember.
Completed
Last Updated: 02 Jun 2017 13:35 by ADMIN
Workaround:

 Sub New()

     InitializeComponent()

     AddHandler Me.RadChartView1.CreateRenderer, AddressOf CreateRenderer
     
     AddHandler Me.RadChartView1.LabelFormatting, AddressOf LabelFormatting 
     Dim barSeries As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName")
     barSeries.ShowLabels = True

     barSeries.DataPoints.Add(New CategoricalDataPoint(177, "Harley"))
     barSeries.DataPoints.Add(New CategoricalDataPoint(128, "White"))
     barSeries.DataPoints.Add(New CategoricalDataPoint(143, "Smith"))
     barSeries.DataPoints.Add(New CategoricalDataPoint(111, "Jones"))
     barSeries.DataPoints.Add(New CategoricalDataPoint(118, "Marshall"))
     Me.RadChartView1.Series.Add(barSeries)
     Dim barSeries2 As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName")
     barSeries2.ShowLabels = True
     barSeries2.DataPoints.Add(New CategoricalDataPoint(153, "Harley"))
     barSeries2.DataPoints.Add(New CategoricalDataPoint(141, "White"))
     barSeries2.DataPoints.Add(New CategoricalDataPoint(130, "Smith"))
     barSeries2.DataPoints.Add(New CategoricalDataPoint(88, "Jones"))
     barSeries2.DataPoints.Add(New CategoricalDataPoint(109, "Marshall"))
     Me.RadChartView1.Series.Add(barSeries2)

 End Sub

 Private Sub LabelFormatting(sender As Object, e As Telerik.WinControls.UI.ChartViewLabelFormattingEventArgs)
     Dim dataPoint As CategoricalDataPoint = TryCast(e.LabelElement.DataPoint, CategoricalDataPoint)
     e.LabelElement.Text = "Value: " & Environment.NewLine & dataPoint.Value
     e.LabelElement.BackColor = Color.Yellow 
 End Sub

 Private Sub CreateRenderer(sender As Object, e As ChartViewCreateRendererEventArgs)
     e.Renderer = New CustomCartesianRenderer(TryCast(e.Area, CartesianArea))
 End Sub

 Public Class CustomCartesianRenderer
 Inherits CartesianRenderer

     Public Sub New(area As CartesianArea)
         MyBase.New(area)

     End Sub

     Protected Overrides Sub Initialize()
         MyBase.Initialize()

         For i As Integer = 0 To Me.DrawParts.Count - 1
             Dim labelPart As BarLabelElementDrawPart = TryCast(Me.DrawParts(i), BarLabelElementDrawPart)
             If labelPart IsNot Nothing Then
                 Me.DrawParts(i) = New CustomLabelElementDrawPart(DirectCast(labelPart.Element, BarSeries), Me)
             End If
         Next
     End Sub
 End Class

 Public Class CustomLabelElementDrawPart
 Inherits BarLabelElementDrawPart
     Public Sub New(owner As ChartSeries, renderer As IChartRenderer)
         MyBase.New(owner, renderer)
     End Sub

     Public Overrides Sub Draw()
         For Each dataPointElement As DataPointElement In Me.Element.Children
             For Each label As LabelElement In dataPointElement.Children
                 label.ForeColor = Color.Transparent
             Next
         Next

         MyBase.Draw()
         Dim graphics As Graphics = TryCast(Me.Renderer.Surface, Graphics)
         Dim radGraphics As New RadGdiGraphics(graphics)
         Dim slot As RadRect
         Dim rect As Rectangle
         Dim stringFormat As New StringFormat()
         stringFormat.Alignment = StringAlignment.Center
         stringFormat.LineAlignment = StringAlignment.Center

         For Each dataPointElement As DataPointElement In Me.Element.Children
             For Each label As LabelElement In dataPointElement.Children
                 label.ForeColor = Color.Transparent
                 slot = label.GetLayoutSlot()
                 slot = AdjustLayoutSlot(slot, label.DataPointElement)
                 rect = ChartRenderer.ToRectangle(slot)
                 Using brush As Brush = New SolidBrush(Color.Red)
                     Dim drawLocation As New PointF()
                     drawLocation.X = rect.X + label.Padding.Left
                     drawLocation.Y = rect.Y + label.Padding.Top

                     graphics.DrawString(label.Text, label.Font, brush, rect, stringFormat)
                 End Using
             Next
         Next
     End Sub
 End Class
Completed
Last Updated: 16 Feb 2017 07:23 by ADMIN
Currently the pages are wrapped around, i.e. when one reaches the last pages and select next using the down arrow key the first page gets selected

Workaround: 
Public Class MyRadPageView
    Inherits RadPageView

    Public Overrides Property ThemeClassName As String
        Get
            Return GetType(RadPageView).FullName
        End Get
        Set(value As String)
            MyBase.ThemeClassName = value
        End Set
    End Property

    Protected Overrides Function CreateUI() As RadPageViewElement
        Select Case Me.ViewMode
            Case PageViewMode.Stack
                Return New RadPageViewStackElement()
            Case PageViewMode.Outlook
                Return New RadPageViewOutlookElement()
            Case PageViewMode.ExplorerBar
                Return New RadPageViewExplorerBarElement()
            Case PageViewMode.Backstage
                Return New MyRadPageViewBackstageElement()
            Case Else
                Return New RadPageViewStripElement()
        End Select
    End Function

End Class

Public Class MyRadPageViewBackstageElement
    Inherits RadPageViewBackstageElement

    Protected Overrides ReadOnly Property ThemeEffectiveType() As Type
        Get
            Return GetType(RadPageViewBackstageElement)
        End Get
    End Property

    Protected Overrides Function SelectNextItemCore(current As RadPageViewItem, forward As Boolean, wrap As Boolean) As Boolean
        Return MyBase.SelectNextItemCore(current, forward, False)
    End Function

    Protected Overrides Sub ProcessKeyDown(e As KeyEventArgs)
        If Me.IsNextKey(e.KeyCode) AndAlso Not Me.IsEditing Then
            Me.SelectNextItem()
        ElseIf Me.IsPreviousKey(e.KeyCode) AndAlso Not Me.IsEditing Then
            Me.SelectPreviousItem()
        ElseIf e.KeyCode = Keys.Home AndAlso Not Me.IsEditing Then
            Me.Owner.SelectedPage = Nothing
            Me.SetSelectedItem(Me.Items.First())
        ElseIf e.KeyCode = Keys.End AndAlso Not Me.IsEditing Then
            Me.Owner.SelectedPage = Nothing
            Me.SetSelectedItem(Me.Items.Last())
        ElseIf e.KeyCode = Keys.F2 Then
            BeginEdit()
        ElseIf e.KeyCode = Keys.Escape Then
            CancelEdit()
        ElseIf e.KeyCode = Keys.Enter AndAlso Me.IsEditing AndAlso Me.ActiveEditor.Validate() Then
            EndEdit()
        End If
    End Sub

End Class
Completed
Last Updated: 09 Feb 2017 10:59 by ADMIN
Workaround: use simple data binding with the editor and its Text property

this.radCalculatorDropDown1.CalculatorElement.EditorContentElement.TextBoxItem.DataBindings.Add("Text", testObject, "TestValue", false, DataSourceUpdateMode.OnPropertyChanged);
Completed
Last Updated: 15 Aug 2017 10:20 by ADMIN
To reproduce: run the attached sample project. You will notice the result illustrated in the provided screenshot. Although the grid is RTL, the print preview dialog show it in LTR.

Workaround:

public class CustomGridPrintStyle : GridPrintStyle
{
    protected override BaseGridPrintRenderer InitializePrintRenderer(RadGridView grid)
    {
        if (this.PrintRenderer != null)
        {
            this.PrintRenderer.PrintCellPaint -= renderer_PrintCellPaint;
            this.PrintRenderer.PrintCellFormatting -= renderer_PrintCellFormatting;
            this.PrintRenderer.ChildViewPrinting -= renderer_ChildViewPrinting;
        }

        BaseGridPrintRenderer renderer = null;

        if (grid.ViewDefinition.GetType() == typeof(ColumnGroupsViewDefinition))
        {
            if (!(renderer is ColumnGroupsViewDefinitionPrintRenderer))
            {
                renderer = new CustomColumnGroupsViewDefinitionPrintRenderer(grid);
            }
        }
        else if (grid.ViewDefinition.GetType() == typeof(HtmlViewDefinition))
        {
            if (!(renderer is HtmlViewDefinitionPrintRenderer))
            {
                renderer = new HtmlViewDefinitionPrintRenderer(grid);
            }
        }
        else
        {
            if (!(renderer is TableViewDefinitionPrintRenderer))
            {
                renderer = new TableViewDefinitionPrintRenderer(grid);
            }
        }

        renderer.ChildViewPrinting += renderer_ChildViewPrinting;
        renderer.PrintCellFormatting += renderer_PrintCellFormatting;
        renderer.PrintCellPaint += renderer_PrintCellPaint;

        return renderer; 
    }

    private void renderer_PrintCellPaint(object sender, PrintCellPaintEventArgs e)
    {
        this.OnPrintCellPaint(sender, e);
    }

    private void renderer_PrintCellFormatting(object sender, PrintCellFormattingEventArgs e)
    {
        this.OnPrintCellFormatting(sender, e);
    }

    private void renderer_ChildViewPrinting(object sender, ChildViewPrintingEventArgs e)
    {
        this.OnChildViewPrinting(sender, e);
    }
}

public class CustomColumnGroupsViewDefinitionPrintRenderer : ColumnGroupsViewDefinitionPrintRenderer
{
    public CustomColumnGroupsViewDefinitionPrintRenderer(RadGridView grid) : base(grid)
    {
    }

    protected override void PrintRow(GridViewRowInfo row, ColumnGroupRowLayout rowLayout, GridPrintSettings settings, int currentX, int currentY, Graphics graphics)
    { 
        float scrollableColumnsOffset = 0f;
        float rightPinnedColumnsOffset = 0f;

        foreach (GridViewColumn col in rowLayout.RenderColumns)
        {
            if (col is GridViewRowHeaderColumn || col is GridViewIndentColumn)
            {
                continue;
            }

            float height = rowLayout.GetRowHeight(row);
            RectangleF cellBounds = rowLayout.GetCorrectedColumnBounds(row, col, this.GridView.RightToLeft == RightToLeft.Yes,
                new RectangleF(0f, 0f, rowLayout.DesiredSize.Width, height));

            if (cellBounds == RectangleF.Empty)
            {
                continue;
            }

            if (col.PinPosition == PinnedColumnPosition.Left)
            {
                if (scrollableColumnsOffset < cellBounds.Right + rowLayout.Owner.CellSpacing)
                {
                    scrollableColumnsOffset = cellBounds.Right + rowLayout.Owner.CellSpacing;
                    rightPinnedColumnsOffset = scrollableColumnsOffset;
                }
            }
            else if (col.PinPosition == PinnedColumnPosition.None)
            {
                if (rightPinnedColumnsOffset < scrollableColumnsOffset + cellBounds.Right + rowLayout.Owner.CellSpacing)
                {
                    rightPinnedColumnsOffset = scrollableColumnsOffset + cellBounds.Right + rowLayout.Owner.CellSpacing;
                }

                cellBounds.X += scrollableColumnsOffset;
            }
            else
            {
                cellBounds.X += rightPinnedColumnsOffset;
            }

            cellBounds.Offset(currentX, currentY);

            GridViewCellInfo cell;
            CellPrintElement printCell;

            if (row is GridViewTableHeaderRowInfo)
            {
                cell = this.GridView.MasterView.TableHeaderRow.Cells[col.Name];

                printCell = this.CreateHeaderCellPrintElement(col);
                if (printCell.Font != settings.HeaderCellFont)
                {
                    if (settings.HeaderCellFont != null)
                    {
                        printCell.Font = settings.HeaderCellFont;
                    }
                    else
                    {
                        settings.HeaderCellFont = printCell.Font;
                    }
                }
            }
            else if (row is GridViewSummaryRowInfo)
            {
                GridViewSummaryRowInfo rowInfo = row as GridViewSummaryRowInfo;
                cell = rowInfo.Cells[col.Name];

                if (cell == null)
                {
                    continue;
                }

                printCell = this.CreateSummaryCellPrintElement(cell);
                if (printCell.Font != settings.SummaryCellFont)
                {
                    if (settings.SummaryCellFont != null)
                    {
                        printCell.Font = settings.SummaryCellFont;
                    }
                    else
                    {
                        settings.SummaryCellFont = printCell.Font;
                    }
                }
            }
            else
            {
                cell = row.Cells[col.Name];

                if (cell == null)
                {
                    continue;
                }

                if (col is GridViewImageColumn)
                {
                    printCell = this.CreateImageCellPrintElement(cell);
                }
                else
                {
                    printCell = this.CreateDataCellPrintElement(cell);
                    if (printCell.Font != settings.CellFont)
                    {
                        if (settings.CellFont != null)
                        {
                            printCell.Font = settings.CellFont;
                        }
                        else
                        {
                            settings.CellFont = printCell.Font;
                        }
                    }
                }
            }

            printCell.TextPadding = this.GridView.PrintStyle.CellPadding;
            printCell.RightToLeft = this.GridView.RightToLeft == RightToLeft.Yes;

            Rectangle rect = new Rectangle((int)cellBounds.X, (int)cellBounds.Y, (int)cellBounds.Width, (int)cellBounds.Height);

            PrintCellFormattingEventArgs formattEventArgs = new PrintCellFormattingEventArgs(row, col, printCell);
            this.OnPrintCellFormatting(formattEventArgs);

            formattEventArgs.PrintCell.Paint(graphics, rect);
           
            PrintCellPaintEventArgs paintEventArgs = new PrintCellPaintEventArgs(graphics, row, col, rect);
            this.OnPrintCellPaint(paintEventArgs);               
        }
    }
}

private void radButton1_Click(object sender, EventArgs e)
{ 
    CustomGridPrintStyle style = new CustomGridPrintStyle();
    
    this.radGridView1.PrintStyle = style;
    RadPrintDocument printDoc = new RadPrintDocument();
    printDoc.Landscape = true;
    printDoc.RightHeader = "Right Header";
    printDoc.HeaderHeight = 100;
    printDoc.AssociatedObject = this.radGridView1;
    
    RadPrintPreviewDialog dialog = new RadPrintPreviewDialog(printDoc);
    
    dialog.Size = new System.Drawing.Size(Screen.PrimaryScreen.Bounds.Width - 200, Screen.PrimaryScreen.Bounds.Height - 200);
    dialog.SetZoom(0.80);
    dialog.ShowDialog();
}
Completed
Last Updated: 15 Aug 2017 10:20 by ADMIN
There should be a way for users to determine if a row passes a certain filter criteria without that affecting any data operations.
Completed
Last Updated: 04 Jan 2017 14:33 by ADMIN
The LargeChange property sets the change in value that one click of the mouse outside of the slider makes. Let's say that the position of your thumb is at the beginning of the RadTrackBar (at position 0), the value of this property is 5 and you click on tick number 14. The thumb will reposition itself to tick number 5, following the step determined by the LargeChange property. However, if the LargeChange has value 0, the thumb will move to position 14. It is necessary to be added another property to control the step when changing the value when using the left/right buttons, e.g. SmallChange.
Completed
Last Updated: 29 Nov 2016 12:00 by ADMIN
currently the chart is updated on MouseUp
Completed
Last Updated: 08 Apr 2019 16:26 by ADMIN
Release R2 2019 (LIB 2019.1.415)
Completed
Last Updated: 29 Nov 2016 10:37 by ADMIN
Workaround: create a custom RadListFilterPopup
private void radGridView1_FilterPopupRequired(object sender, FilterPopupRequiredEventArgs e)
{
    e.FilterPopup = new MyRadListFilterPopup(e.Column);
}

public class MyRadListFilterPopup : RadListFilterPopup
{
    public MyRadListFilterPopup(GridViewDataColumn dataColumn)
        : base(dataColumn, false)
    { }

    protected override RadListFilterDistinctValuesTable GetDistinctValuesTable()
    {
        if (this.DataColumn.OwnerTemplate.HierarchyLevel == 0)
        {
            return base.GetDistinctValuesTable();    
        }

        GridViewColumnValuesCollection distinctValues = this.GetDistinctValuesWithFilter(this.DataColumn);
        RadListFilterDistinctValuesTable valuesTable = new RadListFilterDistinctValuesTable();
        valuesTable.FormatString = this.DataColumn.FormatString;
        valuesTable.DataConversionInfoProvider = this.DataColumn;

        GridViewComboBoxColumn comboBoxColumn = this.DataColumn as GridViewComboBoxColumn;
        if (comboBoxColumn != null && !String.IsNullOrEmpty(comboBoxColumn.ValueMember))
        {
            foreach (object value in distinctValues)
            {
                if (value != null && value != System.DBNull.Value)
                {
                    object rowValue = value;
                    object lookupValue = ((GridViewComboBoxColumn)this.DataColumn).GetLookupValue(value);

                    if (comboBoxColumn.FilteringMode == GridViewFilteringMode.DisplayMember)
                    {
                        rowValue = lookupValue;
                    }

                    if (lookupValue != null)
                    {
                        valuesTable.Add(lookupValue.ToString(), rowValue);
                    }
                }
            }
        }
        else
        {
            foreach (object value in distinctValues)
            {
                valuesTable.Add(value);
            }
        }

        return valuesTable;
    }

    private GridViewColumnValuesCollection GetDistinctValuesWithFilter(GridViewDataColumn column)
    {
        GridViewColumnValuesCollection distinctValues = new GridViewColumnValuesCollection();
        int count = column.OwnerTemplate.ExcelFilteredColumns.Count;
        if ((count > 0 &&
            column == column.OwnerTemplate.ExcelFilteredColumns[count - 1]) || column.OwnerTemplate.HierarchyLevel > 0)
        {
            if (count == 1 || column.OwnerTemplate.HierarchyLevel > 0)
            {
                int index = column.Index;
                if (index >= 0)
                {
                    IList<GridViewRowInfo> templateRows = column.OwnerTemplate.Rows;
                    if (templateRows.Count == 0 && column.OwnerTemplate.Parent != null && column.OwnerTemplate.HierarchyLevel > 0)
                    {
                        templateRows = new List<GridViewRowInfo>();
                        GridViewInfo templateViewInfo = column.OwnerTemplate.MasterViewInfo;
                        for (int i = 0; i < column.OwnerTemplate.Parent.Rows.Count; i++)
                        {
                            GridViewRowInfo parentRow = column.OwnerTemplate.Parent.Rows[i];
                            ((List<GridViewRowInfo>)templateRows).AddRange(column.OwnerTemplate.HierarchyDataProvider.GetChildRows(parentRow, templateViewInfo));
                        }
                    }
                    
                    foreach (GridViewRowInfo row in templateRows)
                    {
                        object cellValue = row.Cells[index].Value;
                        if (!distinctValues.Contains(cellValue))
                        {
                            distinctValues.Add(cellValue);
                        }
                    }
                    if (distinctValues.Count > 0)
                    {
                        return distinctValues;
                    }
                }
            }
        }

        return distinctValues;
    }
}
Completed
Last Updated: 13 Dec 2017 15:02 by ADMIN
Workaround: create custom GanttViewTimelineItemElement with special layout arranging the elements in depending on their parent`s final size. The attached project features a possible implementation.