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>
and not passing thie properties>
Thanks again to all member team of Telerik.
Best regards,
Gezim from Kosova