Hi,
I create a custom button column follow Devin Rader -
http://blogs.infragistics.com/blogs/devin_rader/archive/2010/07/08/creating-custom-columns-for-xamgrid.aspx
I want to use a image instead button content like
But I do not know how to set the Image Source in the Custom ButtonColumn.
Check the attached sample. I added a new property to the ButtonColumn class - ContentTemplate and made a minor change to the ResolveDisplayElement method in ButtonColumnContentProvider.
Using the following markup:
... <ig:XamGrid.Columns> <local:ButtonColumn Key="Btn" Click="ButtonColumn_Click"> <local:ButtonColumn.ContentTemplate> <DataTemplate> <Image Height="16" Width="16" Source="Assets/cross.png" Stretch="None" /> </DataTemplate> </local:ButtonColumn.ContentTemplate> </local:ButtonColumn> ...
You will get the following result:
Hope this helps
I am interested in having button column, but with option to have empty cells
The button visibility should be determined from the ItemsSource (i.e. last column)
Thanks