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

Can't get Datagrid Combobox column to populate.

1 Answer 85 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 17 Sep 2018, 03:01 AM

Even with your example I cannot get the Combobox items to populate.  I find the RadGrid implementation of the Combobox somewhat confusing.

   public class ExternalItemsProvider
   {
      public static List<string> Items { get; } = new List<string> { "5", "7", "8", "4", };
   }

 

 <Page.Resources>
      <local:ExternalItemsProvider x:Key="items"/>

 <tdg:RadDataGrid  Name="tdgClients" UserEditMode="Inline"  Margin="30,5,30,0" Height="200" BorderBrush="LightGray"                                           BorderThickness="1" >
               <tdg:RadDataGrid.Columns>
                  <tdg:DataGridComboBoxColumn PropertyName="StatusId" ItemsSource="{Binding Items, Source=items}" />
               </tdg:RadDataGrid.Columns>
</tdg:RadDataGrid>

 

I even tried connectiong to the combobox datasource directly in code with:   (I'd rather do it this way than via datacontext)

List<string> cbItems = new List<string>();
         foreach (Lookup lu in Statuses)
            cbItems.Add(lu.LookupName);

  ((DataGridComboBoxColumn)tdgClients.Columns[0]).ItemsSource = cbItems;

No errors but still no drop list.

 

 

 

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 17 Sep 2018, 02:43 PM
Hi Robert,

I have prepared a sample example how the DataGrid ComboBox column should be implemented. The example was created following the instructions in our documentation regarding the ComboBox column.

Please take a look at the attached sample and let me know if you have any other questions on this.

Regards,
Didi
Progress Telerik
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
Tags
DataGrid
Asked by
Robert
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or