Hi,
I have already asked about this feature about a half-year ago. Just in case, asking this one more time :)
Is that possible to draw an icon or bitmap on the row selector? New bitmap should not erase what is already have drawn there.
Thank you.
UPD: I mean I want to draw an image on row selector of any single row, not all of them at the same time.
Perhaps a better approach would be to use an UnboundColumn, that is marked as fixed.
This would provide an easier way of displaying custom content.
Then all you'll need to do do is put a button in the ItemTemplate property and listen tot he clicked event.
Hope this helps,
-SteveZ
Stephen:
I am working on something similar can you send me a sample demo. I want to add [+} symbol which when click fires an event to get more detail for that particular row
The symbol can be an image or a hyperlink button
thanks
The name of the property for the Setter is just Template, not ContentTemplate.
So change:
<Setter Property="ContentTemplate">
To<Setter Property="Template">
This is my style for RowSelector:
<Controls:RowSelectorSettings Visibility="Visible" EnableRowNumbering="True" > <Controls:RowSelectorSettings.Style> <Style TargetType="Primitives:RowSelectorCellControl"> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <ContentControl Content="{Binding Cell.Row, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource rsvc}}"/> </DataTemplate> </Setter.Value> </Setter> </Style> </Controls:RowSelectorSettings.Style> </Controls:RowSelectorSettings>
And I get an XamlParseException
System.Windows.Markup.XamlParseException: Property "ContentTemplate" not found in type "Infragistics.Controls.Grids.Primitives.RowSelectorCell". [Line: 35 Position: 30]
What is wrong there?
You can use he various VisualStates of the RowSelector to determine what should be drawn.
For example, you can use the "Editing" VisualState to draw a custom icon for editing.