Hi,
Below is my xaml for a field. The text wrapping works fine when the IsExpandable = False, it does not work when IsExpandable = True.
Any ideas as to what I may be missing?
<igDP:Field Name="Message" Width="100" IsExpandable="True" >
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False">
<igDP:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamTextEditor}">
<Setter Property="TextWrapping" Value="Wrap" />
</igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings>
</igDP:Field.Settings>
</igDP:Field>
Hello Troy,
After looking into this and doing some research, "AddNewRecord and IsExpandable" has been determined to be a new product idea. You can suggest new product ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.
There are many benefits to submitting an product idea:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea:
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics.
Thanks Stefan! That did the job perfectly. Thanks so much!
I have one follow up question for something related to this that I gave up on but you may be able to provice a quick response...
I was trying to also have the xamDataGrid such that the user could insert new rows. I'm using the AllowAddNew property but during runtime I can not add (or see for that matter) the Message field which is the one marked as IsExpandable = 'True', not sure why. Can you see anything in my xaml that I'm missing? Is this even possible given that I'm using IsExpandable = 'True'?
<igDP:XamDataGrid Name="xamDataGrid1" Margin="3,3,3,3" VerticalAlignment="Top" Height="Auto" Width="Auto" Grid.Row="1"
Theme="Office2k7Silver" DataSource="{Binding}" IsEnabled="True" IsGroupByAreaExpanded="False" GroupByAreaLocation="None"
DataContext="{Binding}" PreviewMouseDown="xamDataGrid1_PreviewMouseDown" Background="Transparent">
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings AllowAddNew="True" AutoGenerateFields="False" AllowDelete="True" HighlightAlternateRecords="True" />
<!--AddNewRecordLocation="Default"-->
</igDP:XamDataGrid.FieldLayoutSettings>
<igDP:XamDataGrid.FieldSettings>
<igDP:FieldSettings AllowEdit="True" CellClickAction="Default" Width="Auto" AllowResize="False" />
</igDP:XamDataGrid.FieldSettings>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:Field Name="MessageAdhocMessageTemplatesID" Visibility="Collapsed"/>
<igDP:Field Name="DepartmentID" Visibility="Collapsed"/>
<igDP:Field Name="EmployeeID" Visibility="Collapsed"/>
<igDP:Field Name="TemplateName" Label="Message Templates" Width="400" Visibility="Visible" ToolTip="Double click to select the message template you want to use.">
<!--<igDP:Field.Settings>
<igDP:FieldSettings>
<Setter Property="" Value="Wrap" />
</Style>
</igDP:Field.Settings>-->
<igDP:Field Name="Message" Width="400" IsExpandable="True" >
<igDP:FieldSettings AllowEdit="True">
<igDP:FieldSettings.ExpandableFieldRecordPresenterStyle>
<Style TargetType="{x:Type igDP:ExpandableFieldRecordPresenter}">
<EventSetter Event="Loaded" Handler="ExpandableFieldRecordPresenter_Loaded"/>
</igDP:FieldSettings.ExpandableFieldRecordPresenterStyle>
<!--<igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings.EditorStyle>-->
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
Troy
Thank you for your post. I have been looking into it and I can say that when you set the Field’s IsExpandable to true, there won’t be any CellValuePresenter and Editor for this Field. This is why your Style id not applied. If you want to have text wrapping when a Field is expandable you have to create a Style for the ExpandableFieldRecordPresenter and add an EventSetter for the Loaded event. Then in the handler you can get the TextBlock that is used and set its Width and TextWrapping properties. I created a sample project for you showing this approach. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.