Unplanned
Last Updated: 15 Aug 2017 10:02 by ADMIN
Unplanned
Last Updated: 15 Aug 2017 10:02 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: GridView
Type: Feature Request
0
Example : if we have 5 rows in the grid and if we copy 10 rows from excel and paste in first row, only first 5 records gets pasted and remaining 5 would be ignored.
Unplanned
Last Updated: 15 Aug 2017 09:45 by Eric
The RadGridView designer allows you to add columns and make changes while debugging the application. When you click the Ok button it tells you that your changes cannot be applied and everything is lost. I've done this several times by accident and didn't realize I was debugging until my changes were lost. Maybe disallow making changes to the columns while debugging?
Unplanned
Last Updated: 15 Aug 2017 09:45 by ADMIN
ADMIN
Created by: Dimitar
Comments: 0
Category: GridView
Type: Feature Request
0
 RadGridView, TextBoxColumn - add support for autocomplete.
Unplanned
Last Updated: 15 Aug 2017 10:03 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: GridView
Type: Feature Request
0
To reproduce:

Sub New()        
    InitializeComponent() 
    Dim items As New List(Of WorkOrder)
    For index = 1 To 56
        items.Add(New WorkOrder(index, "Item" & index, 0))
    Next
    Dim rand As New Random
    For index = 57 To 500
        items.Add(New WorkOrder(index, "Item" & index, rand.Next(1, 56)))
    Next

    Me.RadGridView1.Relations.AddSelfReference(Me.RadGridView1.MasterTemplate, "Id", "ParentId")
    Me.RadGridView1.DataSource = items
    Me.RadGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill
    Me.RadGridView1.EnablePaging = True
    Me.RadGridView1.PageSize = 20
End Sub

Public Class WorkOrder
    Private _id As Integer
    Private _name As String
    Private _parentId As Integer
    
    Public Sub New(id As Integer, name As String, parentId As Integer)
        Me._id = id
        Me._name = name
        Me._parentId = parentId
    End Sub

    Public Property Id() As String
            Get
                Return _id
            End Get
            Set(ByVal value As String)
                _id = value
            End Set
        End Property
    
    Public Property Name() As String
            Get
                Return _name
            End Get
            Set(ByVal value As String)
                _name = value
            End Set
        End Property

    Public Property ParentID() As Integer
            Get
                Return _parentId
            End Get
            Set(ByVal value As Integer)
                _parentId = value
            End Set
        End Property
End Class

Workaround: use standard hierarchy: http://docs.telerik.com/devtools/winforms/gridview/hierarchical-grid/hierarchy-of-one-to-many-relations
Unplanned
Last Updated: 15 Aug 2017 10:08 by ADMIN
Similar property is already available in the property grid and tree view exporters.
Unplanned
Last Updated: 15 Aug 2017 10:08 by ADMIN
The selection mode should be as in Windows Explorer - when Control is pressed, one should be able to move the current row with the up/down arrow keys and when Space is pressed, the current row should be selected/deselected. 

This implementation can be used for the time being:
  public partial class Form1 : RadForm
    {
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            AddGridSimpleUnbound();
            radGridView1.MultiSelect = true;

            BaseGridBehavior gridBehavior = radGridView1.GridBehavior as BaseGridBehavior;
            gridBehavior.UnregisterBehavior(typeof(GridViewDataRowInfo));
            gridBehavior.RegisterBehavior(typeof(GridViewDataRowInfo), new MyRowBehavior());

            radGridView1.GridViewElement.Navigator = new MyNavigator();
        }

        class MyNavigator : BaseGridNavigator
        {
            protected override bool DoMultiSelect(GridViewRowInfo oldRow, GridViewColumn oldColumn, GridViewRowInfo row, GridViewColumn column)
            {
                if (!this.IsShiftButtonPressed && this.IsControlButtonPressed && !this.IsMouseSelection)
                {
                    return true;
                }

                return base.DoMultiSelect(oldRow, oldColumn, row, column);
            }
        }

        class MyRowBehavior : GridDataRowBehavior
        {
            bool kbdSelection = false;
            public override bool ProcessKeyPress(KeyPressEventArgs keys)
            {
                if (kbdSelection)
                {
                    kbdSelection = false;
                    return true;
                }
                return base.ProcessKeyPress(keys);
            }
            public override bool ProcessKey(KeyEventArgs keys)
            {
                if (keys.KeyCode == Keys.Space && this.GridControl.MultiSelect && keys.Control)
                {
                    this.GridControl.CurrentRow.IsSelected ^= true;
                    kbdSelection = true;
                    return false;
                }
                else
                {
                    return base.ProcessKey(keys);
                }
            }
        }
}
Unplanned
Last Updated: 14 Oct 2019 06:06 by ADMIN

Please refer to the following code snippet demonstrating how the comparer can be applied:

        public RadForm1()
        {
            InitializeComponent();
            this.radGridView1.EnableFiltering = true;
            this.radGridView1.ShowHeaderCellButtons = true;
            this.radGridView1.FilterPopupInitialized += radGridView1_FilterPopupInitialized; 
        }

        private void radGridView1_FilterPopupRequired(object sender, FilterPopupRequiredEventArgs e)
        {
            RadListFilterPopup popup = e.FilterPopup as RadListFilterPopup;
            if (popup != null)
            { 
                popup.MenuTreeElement.TreeView.TreeViewElement.Comparer = new MyComparer(popup.MenuTreeElement.TreeView.TreeViewElement);
            }
        }

        class MyComparer : TreeNodeComparer
        {
            public MyComparer(RadTreeViewElement treeView)
                : base(treeView)
            {
            }
            public override int Compare(RadTreeNode x, RadTreeNode y)
            {
                if (this.TreeViewElement.SortOrder == SortOrder.Descending)
                {
                    return x.Text.CompareTo(y.Text);
                }
                return x.Text.CompareTo(y.Text) * -1;
            }
        }

Unplanned
Last Updated: 17 Jan 2020 11:23 by ADMIN
Created by: Arun
Comments: 1
Category: GridView
Type: Feature Request
0

Hi, 

I have to transfer data from gridview to a .xlsm file which is for the salary transfer to the bank from the application (Template given by the Bank).

File screenshot attached. 

Need to fill the cells from the loaded gridview to this template.

Please help; I have searched a lot but no luck.

Thank you very much.

 

 

Unplanned
Last Updated: 10 Feb 2020 09:35 by ADMIN
I was creating a table with filters when I noticed that there is an option in the filters for 'EndsWith' but not one for 'DoesNotEndWith'. We use internal part numbers for our products where the last 3 digits determine the department in which the product was made. Because wildcards cannot be used within the RadGridView filters, I am having to create a unusual workaround. The same can be said about 'DoesNotBeginWith'.
Unplanned
Last Updated: 27 Jun 2019 09:53 by ADMIN
Add a new DeferredFilter property on RadGridView level which controls whether the filtering logic will be immediately preformed on each key stroke or only by pressing Enter.
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: 06 Nov 2018 09:14 by ADMIN
ADMIN
Created by: Dimitar
Comments: 0
Category: GridView
Type: Feature Request
0
This can be used for large amounts of data.

Check this - https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfstreamwriter/pdfstreamwriter
Unplanned
Last Updated: 16 May 2019 05:56 by ADMIN
Created by: Shawn
Comments: 2
Category: GridView
Type: Feature Request
0

I have the following logic for my View, which has a RadGridView control (add to form at design-time).

GUI is a lightweight view, Controller does the heavy lifting. That part is all good.

 

However setting the column name and column autosize stuff is a little more "over-complicated" than I'd wish to see. It all works though.

Would be nice to have a "GridViewTextBoxColumnAttribute" as per below, for properties on Custom datasource objects to achieve the same thing in a more concise way.

Or am I missing something and there is a much easier way to do what I want?

 

I have a number of datasource classes: MyObject, MyCar, MyDog, MyWhatever... that ALL have different property names and datatypes, but may or may-not have the same column name or MasterTemplate style.

 

Also BestFitColumns is a function of the MasterTemplate, would be nice if it were a property for consistency sake (call to internal function encapsulated in the Set etc), as from a Telerik user's perspective it's just an enum. Then it would be setable in the SmartTag window as well, as functions can't be assigned to.

 

  public partial class RadForm1 : Telerik.WinControls.UI.RadForm, IView
    {
        public RadForm1)
        {
            InitializeComponent();
        }

        private void RadForm1_Load(object sender, EventArgs e)
        {
            var x = new Controller();
            x.SetTemplate(this);           
        }

        public Telerik.WinControls.UI.RadGridView RadGridView()
        {
            return this.radGridView1;
        }
    }

    public class Controller
    {
        public void SetTemplate(IView view)
        {
            var View_RadGrid = view.RadGridView();
            View_RadGrid.MasterTemplate.AutoGenerateColumns = false;
            View_RadGrid.MasterTemplate.AutoGenerateHierarchy = false;
            View_RadGrid.MasterTemplate.AllowColumnResize = false;
            View_RadGrid.MasterTemplate.BestFitColumns(Telerik.WinControls.UI.BestFitColumnMode.AllCells);

            var cols = new List<Telerik.WinControls.UI.GridViewDataColumn>()
            {
                new Telerik.WinControls.UI.GridViewTextBoxColumn("DisplayName1"),
                new Telerik.WinControls.UI.GridViewTextBoxColumn("DisplayName2")
            };
            View_RadGrid.MasterTemplate.Columns.AddRange(cols.ToArray());

            View_RadGrid.DataSource = new List<MyObject>() 
            { 
                new MyObject() { DisplayName1 = "1", DisplayName2 = "2" }, 
                new MyObject() { DisplayName1 = "3", DisplayName2 = "4" } 
            };
        }

        private class MyObject
        {
            [GridViewTextBoxColumnAttribute("DisplayName1", BestFitColumn = Telerik.WinControls.UI.BestFitColumnMode.AllCells, AllowColumnResize = false)]
            public string DisplayName1 { get; set; }

            [GridViewTextBoxColumnAttribute("DisplayName2", BestFitColumn = Telerik.WinControls.UI.BestFitColumnMode.AllCells, AllowColumnResize = false)]
            public string DisplayName2 { get; set; }
        }
    }

    public interface IView
    {
        Telerik.WinControls.UI.RadGridView RadGridView();
    }

    [System.AttributeUsage(System.AttributeTargets.Property)]
    public class GridViewTextBoxColumnAttribute : System.Attribute
    {
        private string FieldName;
        public Telerik.WinControls.UI.BestFitColumnMode BestFitColumn;
        public bool AllowColumnResize;

        public GridViewTextBoxColumnAttribute(string fieldName)
        {
            this.FieldName = fieldName;
        }
    }

1 2 3 4