GridViewComboBox display images

2 posts, 0 answers
  1. Chen
    Chen avatar
    1 posts
    Member since:
    Sep 2013

    Posted 29 Sep 2013 Link to this post

    <telerik:GridViewComboBoxColumn  Header="2"
                                                     Width="50"
                                                     IsFilterable="False"
                                                     IsComboBoxEditable="True"
                                                     HeaderTextAlignment="Center"
                                                     DisplayMemberPath="CODE"
                                                     SelectedValueMemberPath="ID"
                                                     ItemsSource="{StaticResource  DutyCodeList}"
                                                     DataMemberBinding="{Binding NO2,Mode=TwoWay}"
                    >
                    </telerik:GridViewComboBoxColumn>
    Hi,All

    I met a problem,just like XAML codes I  pasted.
           The ItemsSource of column is StaticResource just like {"ZD","ZDM","ZN"} 
           Now I want to display the corresponding image which already exists in project directory in display model
           and display character list in edit model.


           Please help me out , if possible with code
           
           With Regards

          Chen Junning


            
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 30 Sep 2013 Link to this post

    Hello Chen,

    In order to have an image displayed in view mode, you can redefine the CellTemplate for the column. For example you can check our online documentation here.

    Then place an image and bind it to the path of the image, you can use an IValue Converter to return the exact path for the Binding. Please note that you should set the Binding to the same property you have bound the column to: "NO2".

    I hope this helps.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top