How to not Display Displaymember - GridViewMultiComboBoxColumn

2 posts, 0 answers
  1. KSafadi
    KSafadi avatar
    11 posts
    Member since:
    Oct 2012

    Posted 11 May 2017 Link to this post


    I have used a RadGridView Element with different columns. One column is a GridViewMultiComboBoxColumn with a valuemember and a displaymember, When I drop down the combo I see the displaymember correctly. But when I leave the row I only see the valuemember (1,2,3..)


      Private Sub RadGridView2_CellEditorInitialized(sender As Object, e As GridViewCellEventArgs) Handles RadGridView2.CellEditorInitialized
        If e.Column.Name = "FeldArt2" Then
          Dim editor As RadMultiColumnComboBoxElement = e.ActiveEditor
          If IsNothing(editor) = False Then
            Dim el As RadMultiColumnComboBoxElement = editor
            el.AutoCompleteMode = AutoCompleteMode.Suggest
            Dim lFeldArt As New List(Of clFeldArt)
            lFeldArt.Add(New clFeldArt(1, "Date Picker"))
            lFeldArt.Add(New clFeldArt(2, "Textfeld"))
            lFeldArt.Add(New clFeldArt(3, "Combo"))
            lFeldArt.Add(New clFeldArt(4, "Checkbox"))
            el.ValueMember = "FeldID"
            el.DisplayMember = "FeldArt"
            el.DataSource = lFeldArt
            el.AutoSizeDropDownToBestFit = True
            editor.Columns("FeldID").IsVisible = False
          End If
        End If
      End Sub


    I have attached a file which explain what I mean.

    Does anybody has an Idea whats wrong?

    Thanks in advance for any help.


  2. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    3564 posts

    Posted 15 May 2017 Link to this post

    Hello Karim, 

    Thank you for writing.  

    According to the provided code snippet, it seems that you specify the DataSource for the RadMultiColumnComboBoxElement when the editor is initialized. However, the column itself doesn't have a DataSource applied. That is why the value members are displayed in the grid cells. Please refer to the following help article demonstrating how to setup the GridViewMultiComboBoxColumn and bind it to a collection from which to extract the information for the cells' text:

    I hope this information helps. Should you have further questions I would be glad to help.

    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top