I want to display a Row Header (like a column header for columns) and i believe that RecordSelector is what i should manipulate to achieve that? Could some one help me understand how to achieve this? What i am trying to achieve is to have a Header(like the column header) for each row in my grid.I want to be able to set the row headers by setting some property like "ItemsSource" (like a listBox ItemSource and Path for Binding)
Thanks in advance..
Hello,
Yes, the arrow is gone, because of the custom control template. If you want to keep it you have to use the full style and retemplate it, keeping what you want. You can find the default style for the RecordSelector element in the DataPresenterGeneric_Express.xaml file, which is in the DefaultStyles directory in the Infragistics folder. I am attaching it now here, in this thread, but for future reference, the DefaultStyles is the folder you should be searching in.
Regarding the width, this will be ignored and not taken into consideration. If you want to resize (make bigger) the space for the record selector, you have to set the RecordSelectorExtent property of the FieldLayoutSettings object of the XamDataGrid, something like this:
xamDataGrid1.FieldLayoutSettings.RecordSelectorExtent = 200;
Please let me know if you have further questions on this.
Thanks a lot...I tried to set the Width also in the style and it has no effect..My text is getting cut off...Anything i am missing?
This is also what kinda what I want to do. You can add text to the record selector by adding a style to the xamdatagrid. resources. This is a very simple example.
<Style TargetType="{x:Type my:RecordSelector}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type my:RecordSelector}"> <TextBlock Text="{Binding Path=DataItem.MyField }"/> </ControlTemplate> </Setter.Value> </Setter> </Style>
The trouble for me is that the original arrow is gone and I would like to keep the arrow. I have tried to find the original RecordSelector ControlTemplate without luck. Could someone from Infragistics post the original RecordSelector ControlTemplate so I can use that as a framework to modify the record selector.