Hi
I have a xamdatacard which is bound to a datatable. One of the cells contains multilined text which could be up to 3000 characters. I would like to limit this to display only 255 characters and then display the fulltext as a tooltip when hovering over this cell.
<igDP:XamDataPresenter Name="myDataPresenter" Grid.Row="1" BindToSampleData="False" AutoFit="True" Margin="0,0,0,6" Visibility="Visible" >
<igDP:XamDataPresenter.FieldSettings>
<igDP:FieldSettings AllowRecordFiltering="True" FilterClearButtonVisibility="Visible" FilterOperandUIType="Combo" FilterOperatorDefaultValue="Contains" FilterStringComparisonType="CaseInsensitive" AllowEdit="False" AllowGroupBy="False" AllowCellVirtualization="True" AllowLabelVirtualization="True" AllowResize="False" AllowSummaries="False" CellClickAction="SelectCell" />
</igDP:XamDataPresenter.FieldSettings>
<igDP:XamDataPresenter.FieldLayoutSettings>
<igDP:FieldLayoutSettings AutoGenerateFields="False" AllowAddNew="False" AllowDelete="False" HighlightAlternateRecords="True" HighlightPrimaryField="Highlight" />
</igDP:XamDataPresenter.FieldLayoutSettings>
<igDP:XamDataPresenter.FieldLayouts>
<igDP:FieldLayout Key="myLayout">
<igDP:FieldLayout.Fields>
<igDP:Field Name="ExerciseTitle" Label="ExerciseTitle" Height="Auto" Width="235"/>
<igDP:Field Name="ExerciseText" Label="ExerciseText" Height="90" Width="235"/>
<igDP:Field Name="Difficulty" Label="Difficulty" Height="Auto" Width="235"/>
<igDP:Field Name="BodyParts" Label="BodyParts" Height="Auto" Width="235"/>
<igDP:Field Name="ExerciseFunctions" Label="ExerciseFunctions" Height="Auto" Width="235"/>
<igDP:Field Name="ExerciseID" Label="ExerciseID" Height="0" Width="0" Visibility="Hidden" />
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataPresenter.FieldLayouts>
<igDP:XamDataPresenter.View>
<igDP:CardView>
<igDP:CardView.ViewSettings>
<igDP:CardViewSettings AutoFitCards="HorizontallyAndVertically" HeaderPath="ExerciseID" ShouldCollapseEmptyCells="True" />
</igDP:CardView.ViewSettings>
</igDP:CardView>
</igDP:XamDataPresenter.View>
</igDP:XamDataPresenter>
Hello,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I used the XamTextEditor’s ValueToDiplayTextConverter Property to restrict the displayed value’s length to 5 (in my sample) and I also created a Style for the CellValuePresenter to set its ToolTip to be the whole value, not just the displayed part. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hi Stefan,
when i try and load the solution i get the below error messages.
Error 7 The attachable property 'FieldLayouts' was not found in type 'XamDataPresenter'. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 28 14 WpfApplication1 Error 5 The attachable property 'FieldSettings' was not found in type 'XamDataPresenter'. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 18 14 WpfApplication1 Error 10 The attachable property 'Settings' was not found in type 'Field'. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 31 26 WpfApplication1 Error 12 The attachable property 'View' was not found in type 'XamDataPresenter'. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 37 14 WpfApplication1 Error 14 The attachable property 'ViewSettings' was not found in type 'CardView'. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 39 22 WpfApplication1 Warning 16 The referenced component 'InfragisticsWPF4.DataPresenter.v12.1' could not be found. Warning 17 The referenced component 'InfragisticsWPF4.Editors.v12.1' could not be found. Warning 18 The referenced component 'InfragisticsWPF4.v12.1' could not be found. Error 13 The type 'igDP:CardView' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 38 18 WpfApplication1 Error 15 The type 'igDP:CardViewSettings' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 40 26 WpfApplication1 Error 9 The type 'igDP:Field' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 30 22 WpfApplication1 Error 8 The type 'igDP:FieldLayout' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 29 18 WpfApplication1 Error 6 The type 'igDP:FieldSettings' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 19 18 WpfApplication1 Error 11 The type 'igDP:FieldSettings' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 32 30 WpfApplication1 Error 4 The type 'igDP:XamDataPresenter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 17 10 WpfApplication1 Error 3 The type 'local:ClipTextConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 9 14 WpfApplication1 Warning 1 The type reference cannot find a public type named 'CellValuePresenter'. Line 10 Position 87. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 10 87 WpfApplication1 Error 2 Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'WpfApplication1' that is not included in the assembly. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 5 21 WpfApplication1
It seems like that the versions of NatAdvantage that we use are different ( I use 12.1 ), so I can suggest you remove the references for version 12.1 and add the ones you have, you should add WPF, DataPresenter and Editors assemblies.
Hope this helps you.
i have installed 12.1 and get the below errors when i load the solution.
Error 2 The type 'local:ClipTextConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 9 14 WpfApplication1
Error 1 Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'WpfApplication1' that is not included in the assembly. D:\Personal\Dropbox\Work\Dev\XamDataCardsToolTip\WpfApplication1\MainWindow.xaml 5 21 WpfApplication1
When I sent you the sample I removed the bin and obj files from it, so it could be smaller for uploading and since there is stored the assembly of the project and the namespace that the error is about is in that assembly, this behavior is expected. I can suggest you build the solution, so it generates the bin and obj folders.