RadMultiColumnComboBox display bug

9 posts, 2 answers
  1. Sandi Markon
    Sandi Markon avatar
    101 posts
    Member since:
    Jul 2012

    Posted 18 Oct 2010 Link to this post

    If combobox datasource has not enough items, dropdown is not displayed correctly until we resize it. Image in attachment...
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 18 Oct 2010 Link to this post

    Hi, 

    What version of the controls are you using? 
    if you are using an older version, could you please try the following code.. 

    Private Sub combo_DropDownOpened(ByVal sender As Object, ByVal e As EventArgs)
        Dim combo As RadMultiColumnComboBox = DirectCast(sender, RadMultiColumnComboBox)
        combo.EditorControl.GridElement.VScrollBar.Value = 0
        combo.EditorControl.Rows(combo.EditorControl.Rows.Count - 1).EnsureVisible()
    End Sub

    Let me know if this isn't helping
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Sandi Markon
    Sandi Markon avatar
    101 posts
    Member since:
    Jul 2012

    Posted 19 Oct 2010 Link to this post

    I have tried above code, but it does not help. I use version 2010.2.10.806. As I said, if I resize dropdown window, display is corrected. Dropdown is also displayed correctly if datasource has more items.
  5. Answer
    Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 19 Oct 2010 Link to this post

    Hello Sandi,

    Please just try setting the AutoSizeDropDownToBestFit property to true and please let me know if this solved your problem.

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga


  6. Sandi Markon
    Sandi Markon avatar
    101 posts
    Member since:
    Jul 2012

    Posted 21 Oct 2010 Link to this post

    Thanks for your answer and sorry I have bothered you - I have missed this property.
  7. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 21 Oct 2010 Link to this post

    Hello Sandi,

    You are not bothering me, I'm always glad to help.

    And as always, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga
  8. Gezim
    Gezim avatar
    4 posts
    Member since:
    Jun 2012

    Posted 19 Jun 2012 Link to this post

    Hi,
    I am using this property for best fit my column(objComboBox.MultiColumnComboBoxElement.AutoSizeDropDownToBestFit =

     

    true;) in RadMultiColumnComboBox columns but when i have data source which have a lot of data i need to implement filtering on it.
    I am implemening it in this way:

     

    FilterDescriptor filter = new FilterDescriptor();

    filter.PropertyName = objComboBox.DisplayMember;

    filter.Operator =

     

    FilterOperator.Contains;

    objComboBox.EditorControl.MasterTemplate.FilterDescriptors.Add(filter);
    but it's take a lot of time when the filter is auto complete.
    Please how to make filtering in this controll and dont take a time.
    Note: When i am not using
    AutoSizeDropDownToBestFit it's( Filter) works fine and i dont have delay( my data source have more then 1000 items and 3 columns), but when i have Combo which have more then 3 column and the size of DropDown is less, than the user can not see what have in that control.
    What is your suggestion to eliminate this issue.
    Best regards,
    Gezim

    Updated:22.06.2012
    I have reply from Telerik Team, thanks for all.
    Best regards,
    Gezim

     

  9. Svett
    Admin
    Svett avatar
    728 posts

    Posted 22 Jun 2012 Link to this post

    Hello Gezim,

    Yes, your observation is correct. RadMultiColumnComboBox is opening its drop down window slowly, because of the AutoSizeDropDownToBestFit property. When it is set to true, RadMultiColumnComboBox calculates the width of all cells in order to determine the optimal width. In case when there are many rows or columns in the grid, this can be a slow process. 

    When you want to speed up this process, you could call the BestFitColumns method:

    this.radMultiColumnComboBox1.ValueMember = "ID";
    this.radMultiColumnComboBox1.DisplayMember = "Name";
    this.radMultiColumnComboBox1.DataSource = table;
    this.radMultiColumnComboBox1.AutoSizeDropDownToBestFit = false;
    this.radMultiColumnComboBox1.BestFitColumns(true, false);
    Best wishes,
    Svett
    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
  10. Answer
    Gezim
    Gezim avatar
    4 posts
    Member since:
    Jun 2012

    Posted 22 Jun 2012 Link to this post

    Hi Svett,
    Thanks a lot for reply. This that you have postet halps me a lot(i have traied already) but the user can not see the column header text and for that i am not applaing this property(only in those LookUp combo where i have a lot of data).
    I am waiting from you elmanifice gays to optimaize this property to work.
    I have done one solution, and i am using it.
    when i will call the method to fill my Combo i am passing the optional parameter where i want to not call this property.
    The code below do that>
    public static DataSet FillRadLookUpEdit(Telerik.WinControls.UI.RadMultiColumnComboBox objComboBox, string SqlQuery, int KeyColumn, DataSet Dataset, bool AutoSizeDropDownToBestFit = true)
    {
    Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
    DataSet Sqlds = default(DataSet);
    if (Dataset == null)
    {
    Sqlds = new DataSet();
    SqlDataAdapter Sqlda = new SqlDataAdapter();
    Sqlda.SelectCommand = new SqlCommand(SqlQuery, Database.CheckConn());
    Sqlda.SelectCommand.CommandTimeout = 0;
    Sqlda.Fill(Sqlds, "SqlResult");
    }
    else
    {
    Sqlds = Dataset;
    }
    objComboBox.DataSource = Sqlds.Tables[0];
    objComboBox.ValueMember = Sqlds.Tables[0].Columns[0].Caption;
    objComboBox.DisplayMember = Sqlds.Tables[0].Columns[KeyColumn].Caption;
    objComboBox.SelectedIndex = -1;
    objComboBox.MultiColumnComboBoxElement.DropDownWidth = -1;
    objComboBox.MultiColumnComboBoxElement.AutoSizeDropDownToBestFit = AutoSizeDropDownToBestFit;//As you can seee i am using this optionals parameter
    if (AutoSizeDropDownToBestFit) objComboBox.MultiColumnComboBoxElement.BestFitColumns();
    //objComboBox.MultiColumnComboBoxElement.BestFitColumns(true, false);
    objComboBox.AutoFilter = true;
    objComboBox.MultiColumnComboBoxElement.AutoFilter = true;
    FilterDescriptor filter = new FilterDescriptor();
    filter.PropertyName = objComboBox.DisplayMember;
    filter.Operator = FilterOperator.Contains;
    objComboBox.EditorControl.MasterTemplate.FilterDescriptors.Add(filter);
    }

    And as you can see i am passing one optional parameter on the method and depens on which controll i am using i pass it.
    Example of calling>
    GvGrid.FillRadLookUpEdit(cmbClientFilter, "dbo.List_Partners '" + Maintenance.DefaultCulture + "', '" + Maintenance.CurrentCulture + "', '" + Database.CurrentUser + "'", 1, null,false);
    and not passing thie properties>
    GvGrid.FillRadLookUpEdit(cmbCurrency, "dbo.List_Currencies_Lkp '" + Maintenance.DefaultCulture + "', '" + Maintenance.CurrentCulture + "', '" + Database.CurrentUser + "'", 0, null);
    Thanks again to all member team of Telerik.
    Best regards,
    Gezim from Kosova
Back to Top
UI for WinForms is Visual Studio 2017 Ready