ComboBoxColumn display truncating

2 posts, 0 answers
  1. Terry
    Terry avatar
    1 posts
    Member since:
    Aug 2015

    Posted 31 Aug 2015 Link to this post

     I have an expander containing a grid with a ComboBoxColumn and a template applied in order to provide for the application of a style to result in an embedded search behavior.  Mostly that works well, with one clear problem.  The text displayed in the resulting drop down is truncated and I have been unable to affect this truncation.


    I doubt the converter I am using to load only distinct values has anything to do with the truncation, but I have include all of the potentially significant code and attached an image of the resulting display with a selection of a row being truncated in the drop down display (not in the grid cell) to demonstrate the problem.  I want to cause the drop down to use the entire width to display the items, and it is not.


    I will entertain any useful recommendations.  I have tried manually controlling the width of the drop down both with explicit and automatic width settings in the template and it can change the width of the drop down, but the text is still truncated.


           <converters:DropDownCodesDistinctOpen x:Key="DropDownCodesDistinctOpen" />


                        <telerik:RadExpander Style="{StaticResource RatesExpander}" Expanded="RadExpander_Expanded"
                                Header="Time Code (D) Flat" Name="rexTimeCode">
                                <telerik:RadGridView Style="{StaticResource rgvRatesDetail}"
                                        CellEditEnded="rgvTkprIDActivityCode_CellEditEnded" Name="rgvTimeCode"
                                                    <telerik:RadButton Height="18" Width="20"
                                                            CommandParameter="{Binding}" Name="btnDelete">
                                                        <Image Source="/LawtimeMain;component/Icons/delete.png" />
                                        <telerik:GridViewComboBoxColumn Width="*"
                                                DataMemberBinding="{Binding Id1, Mode=TwoWay}" 
                                                ItemsSourceBinding="{Binding Id1, Converter={StaticResource DropDownCodesDistinctOpen}, ConverterParameter=TC}"
                                                Header="Time Code"
                                                CellStyleSelector="{StaticResource CellStyleSelector}"
                                                <Style TargetType="telerik:RadComboBox">
                                                    <Setter Property="ItemContainerStyle" Value="{StaticResource comboBoxItemStyle}" />
                                                    <Setter Property="IsFilteringEnabled" Value="True"/>
                                                    <Setter Property="StaysOpenOnEdit" Value="True"/>
                                                    <Setter Property="OpenDropDownOnFocus" Value="True"/>
                                                    <Setter Property="TextSearchMode" Value="Contains" />
                                                    <Setter Property="ItemsPanel">

                                                CellStyleSelector="{StaticResource CellStyleSelector}"
                                                DataMemberBinding="{Binding IsPercent}" Header="%" />
                                        <telerik:GridViewDataColumn CellStyleSelector="{StaticResource CellStyleSelector}"
                                                DataFormatString="{}{0:n}" DataMemberBinding="{Binding RateOrPct}"
                                                Header="Rate" />
                                        <Style TargetType="TextBlock" />


         public class DropDownCodesDistinctOpen : IValueConverter
            public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
                return LawtimeMain.LMUtils.GetCodeDropDownDistinctOpen(parameter.ToString(),8);

            public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
                return "";

            public static List<ddKeyValue> GetCodeDropDownDistinctOpen(string codeType, int? keywidth)
                App ap = (App)Application.Current;
                List<ddKeyValue> ddClass = new List<ddKeyValue>();

                var tkclass = from LTMainService.LTCode a in ap.mpData.LTCodes where a.RecordType == codeType orderby  a.CoCode ,a.Description select a;

                foreach (var a in tkclass)
                    if (a.Status != 'C' && LawtimeMain.LMUtils.FindKey(ddClass,a.CoCode.Trim())==null)
                    {//could use .contains if I figured out how do to an equality specified dynamically
                        ddKeyValue ddkv = new ddKeyValue();
                        ddkv.Key = a.CoCode.Trim();
                        if (keywidth != null && keywidth > 0)
                            ddkv.Value = a.CoCode + new String(' ', (int)(keywidth - a.CoCode.Length)) + a.Description.Trim();
                            ddkv.Value = a.CoCode.Trim() + " " + a.Description.Trim();

                        ddkv.Status = a.Status;
                return ddClass;

            public static object FindKey(List<ddKeyValue> myList, string key)
                foreach (var item in myList)
                    if (item.Key == key)
                        return item;
                return null;

  2. Nasko
    Nasko avatar
    555 posts

    Posted 03 Sep 2015 Link to this post

    Hi Terry,

    We are not aware of the observed by you appearance of RadGridView's GridViewComboBoxColumn. However, we noticed that a lot Styles and StyleSelectors have been modified and set to the RadExpander, RadGridView etc. - some of the applied styles could cause the observed unexpected appearance.

    Could you please try to isolate the issue in a simple sample project and send it back to us - thus we could be able to continue our investigation and provide you with a prompt solution or some detailed technical instructions how to resolve it.

    We are looking forward to hearing from you.

    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 Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top