This is a migrated thread and some comments may be shown as answers.

Tab key pressed in GridViewComboBoxColumn

2 Answers 119 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Todd
Top achievements
Rank 1
Todd asked on 27 Sep 2010, 06:29 PM
If you have a GridViewComboBoxColumn in a RadGridView control, use your mouse to drop down the list of entries, use your down key on your keyboard to select an entry in the list, now select the tab key on your keyboard.  You will see that the Telerik control leaves behind a blank window (even after closing the form).  Does anyone know how I get rid of this leftover window? 

2 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 28 Sep 2010, 06:51 AM
Hello Todd,

Sadly i could not reproduce your issue, but honestly i don't know if I understood the problem correctly, please try the following code and let me know if the same thing happens here, or if i got something wrong please make the necessary changes here so we can have a real example of the problem.

namespace GridLookup
{
    using System;
    using System.ComponentModel;
    using System.Windows.Forms;
    using Telerik.WinControls.UI;
 
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.Load += new EventHandler(Form1_Load);
        }
 
        private void Form1_Load(object sender, EventArgs e)
        {
            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.radGridView1.DataBindingComplete += new GridViewBindingCompleteEventHandler(radGridView1_DataBindingComplete);
            this.radGridView1.DataSource = new ProductsCollection();
        }
 
        void radGridView1_DataBindingComplete(object sender, GridViewBindingCompleteEventArgs e)
        {
            radGridView1.Columns["BuyerId"].IsVisible = false;
 
            var column = new GridViewComboBoxColumn("Buyer", "Buyer");
            column.DataSource = new BuyersCollection();
            column.ValueMember = "Id";
            column.FieldName = "BuyerId";
            column.DisplayMember = "Name";
            this.radGridView1.Columns.Add(column);
 
            this.radGridView1.BestFitColumns();
        }
    }
 
    #region Helpers
 
    public class Product
    {
        public int Id
        {
            get;
            set;
        }
 
        public int BuyerId
        {
            get;
            set;
        }
 
        public Product(int id, int buyerId)
        {
            this.Id = id;
            this.BuyerId = buyerId;
        }
    }
 
    public class Buyer
    {
        public int Id
        {
            get;
            set;
        }
 
        public string Name
        {
            get;
            set;
        }
 
        public Buyer(int id, string name)
        {
            this.Id = id;
            this.Name = name;
        }
    }
 
    public class ProductsCollection : BindingList<Product>
    {
        public ProductsCollection()
        {
            for (int i = 0; i < 10; i++)
            {
                this.Add(new Product(i, i + 10));
            }
        }
    }
 
    public class BuyersCollection : BindingList<Buyer>
    {
        public BuyersCollection()
        {
            for (int i = 0; i < 10; i++)
            {
                this.Add(new Buyer(i + 10, "Buyer" + (i + 1)));
            }
        }
    }
 
    #endregion Helpers
}

Also, if you are not using the latest version you should try, if possible, updating to the latest version.

Best Regards,
Emanuel Varga
0
Jack
Telerik team
answered on 30 Sep 2010, 04:12 PM
Hi Todd, please open a support ticket and send us your application. This will help us to understand and locate the issue. 

Should you have any other questions, do not hesitate to ask.

Best wishes,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Todd
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Jack
Telerik team
Share this question
or