Support for images in FlexGrid

Posted by: stefan on 3 June 2018, 5:12 pm EST

  • Posted 3 June 2018, 5:12 pm EST

    Is there any support for handling images in FlexGrid?
    I'm converting a .Net Compact Framework application where we use the ImageMap and ImageAndText properties on a column.
    We also use the SetCellImage function on the grid.
    I suppose I can implement this via custom cells, but if it is already possible or on the roadmap it would save me some time.
  • Replied 3 June 2018, 11:18 pm EST

    You can use the Column's CellTemplate to display images in FlexGrid:

    <c1:GridColumn Binding="OrderTotal" Header="Order Total" Width="*">
    <c1:GridColumn.CellTemplate>
    <DataTemplate>
    <gauge:C1BulletGraph IsAnimated="False" IsReadOnly="True" Value="{Binding OrderTotal}" Min="0" Max="10000" Bad="1000" Good="6000" Target="7000"/>
    </DataTemplate>
    </c1:GridColumn.CellTemplate>
    </c1:GridColumn>


    Instead of C1BulletGraph, you can place an image control. Currently this is the only way to show images in FlexGrid.
  • Replied 4 June 2018, 12:15 am EST

    Hi Stefan

    Also, if you've downloaded our samples, you can take a look at the FlexGrid101 OnDemand sample and the GridImageColumn class it uses. You could borrow the code for the GridImageColumn, and use it for a similar solution in your project.

    https://github.com/GoXuni/C1-Studio-for-Xamarin/blob/master/XF/FlexGrid101/FlexGrid101.XF/View/OnDemand.xaml

    https://github.com/GoXuni/C1-Studio-for-Xamarin/blob/master/XF/FlexGrid101/FlexGrid101.XF/Columns/GridImageColumn.cs

    Thanks

    Kelley
  • Replied 4 June 2018, 3:50 am EST

    Ok, thanks for the info. I'll take a look at that.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels