
Martin Gleiß
Top achievements
Rank 1
Martin Gleiß
asked on 25 Aug 2010, 10:12 AM
Hi,
is it possible to resize the combobox without resizing the column?
More specific: My Grid has a ComboBoxColumn with sometime long text and I want to show in the DropDown the whole text, but in the Grid only a fix width. How can I manage this?
Best Regards
is it possible to resize the combobox without resizing the column?
More specific: My Grid has a ComboBoxColumn with sometime long text and I want to show in the DropDown the whole text, but in the Grid only a fix width. How can I manage this?
Best Regards
5 Answers, 1 is accepted
0
Accepted
Hello Martin Gleiß,
Thank you for writing.
You can set MinSize or Width in the editor's PopupOpened event. Please consider the following code snippet:
I hope this helps. Let me know if you have any additional questions.
Sincerely yours,
Martin Vasilev
the Telerik team
Thank you for writing.
You can set MinSize or Width in the editor's PopupOpened event. Please consider the following code snippet:
void
radGridView1_CellBeginEdit(
object
sender, GridViewCellCancelEventArgs e)
{
RadDropDownListEditor editor =
this
.radGridView1.ActiveEditor
as
RadDropDownListEditor;
if
(editor !=
null
)
{
RadDropDownListEditorElement editorElement = (RadDropDownListEditorElement)editor.EditorElement;
editorElement.DropDownSizingMode = SizingMode.RightBottom;
editorElement.PopupOpened +=
new
EventHandler(editorElement_PopupOpened);
}
}
void
editorElement_PopupOpened(
object
sender, EventArgs e)
{
//((RadDropDownListEditorElement)sender).Popup.Width = 300;
((RadDropDownListEditorElement)sender).Popup.MinimumSize =
new
Size(150, 0);
}
I hope this helps. Let me know if you have any additional questions.
Sincerely yours,
Martin Vasilev
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

Martin Gleiß
Top achievements
Rank 1
answered on 31 Aug 2010, 12:15 PM
Hi,
which assembly have I to include to use
which assembly have I to include to use
"RadDropDownListEditor"
?0
Accepted
Hello Martin Gleiß,
Thank you for getting back to me.
RadDropDownListEditor is located in the Telerik.WinControls.UI.dll assembly. You should also add the following namespace in your using clauses:
Best wishes,
Martin Vasilev
the Telerik team
Thank you for getting back to me.
RadDropDownListEditor is located in the Telerik.WinControls.UI.dll assembly. You should also add the following namespace in your using clauses:
using
Telerik.WinControls.UI;
Best wishes,
Martin Vasilev
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

Trevor
Top achievements
Rank 1
answered on 22 Oct 2010, 11:51 PM
I need to adjust the size of the drop down list on a grid view combo box column, and I am trying the code you have shown here, but I cannot access
RadDropDownListEditorElement. I have no idea what version I am using. I use telerik controls at work and they already had these controls when I started. I have using
Telerik.WinControls.UI; in my using statements, and am referencing the Telerik.WinControls.UI dll.0
Hello Trevor,
Thank you for writing.
Recently, we have changed the default combo-box column editor and if you are using an old version, it is possible that you cannot get a RadDropDownListEditor. Please try using RadComboBoxEditor and RadComboBoxEditorElement instead. Still, I recommend upgrading to the latest version Q2 2010 SP2 since it contains a numerous bug fixes and improvements.
Let me know if you need any additional assistance.
Greetings,
Martin Vasilev
the Telerik team
Thank you for writing.
Recently, we have changed the default combo-box column editor and if you are using an old version, it is possible that you cannot get a RadDropDownListEditor. Please try using RadComboBoxEditor and RadComboBoxEditorElement instead. Still, I recommend upgrading to the latest version Q2 2010 SP2 since it contains a numerous bug fixes and improvements.
Let me know if you need any additional assistance.
Greetings,
Martin Vasilev
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