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

RadMultiColumnComboBox display bug

8 Answers 471 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
Sandi Markon
Top achievements
Rank 1
Sandi Markon asked on 18 Oct 2010, 10:13 AM
If combobox datasource has not enough items, dropdown is not displayed correctly until we resize it. Image in attachment...

8 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 18 Oct 2010, 01:55 PM
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
0
Sandi Markon
Top achievements
Rank 1
answered on 19 Oct 2010, 08:29 AM
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.
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 19 Oct 2010, 08:48 AM
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


0
Sandi Markon
Top achievements
Rank 1
answered on 21 Oct 2010, 09:26 AM
Thanks for your answer and sorry I have bothered you - I have missed this property.
0
Emanuel Varga
Top achievements
Rank 1
answered on 21 Oct 2010, 09:29 AM
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
0
Gezim
Top achievements
Rank 1
answered on 19 Jun 2012, 11:12 AM

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

 

0
Svett
Telerik team
answered on 22 Jun 2012, 11:41 AM
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
0
Accepted
Gezim
Top achievements
Rank 1
answered on 22 Jun 2012, 12:04 PM
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
Tags
MultiColumn ComboBox
Asked by
Sandi Markon
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Sandi Markon
Top achievements
Rank 1
Emanuel Varga
Top achievements
Rank 1
Gezim
Top achievements
Rank 1
Svett
Telerik team
Share this question
or