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,
Is it possible if the user double clicks on a card to show/pop up the details of that card in a control below that card and adjusts the vertical space between the card to have the detail between these 2 rows of card.
Hello Jaffar,
I can suggest you use the approach described here:
http://es.infragistics.com/community/forums/t/43348.aspx
for the XamDataGrid, becasue such functionality cannot be achieved in the XamDataCards.
I can say that currently XamDataCards are not able to display hierarchical data, so I can suggest you use the XamDataGrid. Also if you want I can log a product idea for hierarchical support in XamDataCards.
I was exploring a bit into it and found something , want to clarify whether xamdataxcards uses it in any way or just ignores it.
If i bind a hierarchical data(parent/child collections) and check the DataRecord, it has the ViewableChildRecords collection that was provided in the binding and the type of it is ExpandableFieldRecord with the datapresenter is XamDataCards(field layout contains the child fields). I tried provinding my custom ExpandedCellPresenter used to display ExpandableFieldRecord , but it does not show anything . Any idea what does CardViewPanel do with ExpandableFieldRecord and ChildRecords, does it just ignore it or it use it somehow... I dont have the code handy right now to see what CardViewPanel does with this.
((sender_ as XamDataCards).Records[5].ViewableChildRecords[0] as ExpandableFieldRecord).DataPresenter{Infragistics.Windows.DataPresenter.XamDataCards}
One more quick question, can we override the ArrangeOverride method in CardViewPanel to have a specific card of different size, if so how can we do that bcos it just has the size info..