Hello,
I need to show in a comboboxcolumn two properties of a complex object.
To achieve that I used the ValueConverter but it doesn't show me anything.
I attached a sample to show you how I do it.
Regards.
Hello Coso,
In the ComboBoxColumn set the SelectedValuePath and DisplayMemberPath properties.
Let me know if I can provide any further assistance.
Hello Duane,
I set the displamemberpath and selectedValuePath to property "Rue" but it doesn't work either.
The Ok button by default sets the IsEnabled property from CanFilter that is disabled when unchecking Select All checkbox. E.g.:
<Button x:Name="AcceptButton" Margin="0,0,5,0" Width="73" Content="{TemplateBinding OKButtonText}" IsEnabled="{Binding Path=CanFilter, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">
The "No data available" message uses a TextBlock element setting the Opacity to 0 that is defined from VisualState:
<VisualState x:Name="HideSelectionBoxWaterMark" > <Storyboard> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ItemsBoxWatermark" Storyboard.TargetProperty="(UIElement.Opacity)"> <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/> </DoubleAnimationUsingKeyFrames> </Storyboard></VisualState>
In the AcceptChanges method possibly a condition to add a check for a null reference on RowsManager was missing:
RowsManager rm = cell.Row.Manager as RowsManager; if (rm == null){ return;}
if (rm == null){ return;}
The search textbox uses a FilterTextBoxWatermarked setting IsEnabled from the ItemSourceSet property value.
<igPrim:FilterTextBoxWatermarked Grid.Row="2" Grid.Column="1" Margin="8,7,6,1" HorizontalAlignment="Stretch" IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ItemSourceSet}" FilterSelectionControl="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
Thanks for your answer but all those things are already done in the template and it doesn't work.
Could you provide me a sample, please.
P.S. : The most important thing is that filters are not applied when clicking Ok.
I looked over your issue and believe this can be resolved with a few minor modifications to your original sample. In order for filtering to work on the complex object you can implement IComparable on the object itself. Then in order to have the distinct values display meaningfully in the drop down you can override the ToString() method to display the value you would like to see displayed.
I have attached a sample illustrating this.
Please let me know if this resolved your issue.
Sincerely,
Valerie
Developer Support Engineer
Infragistics
www.infragistics.com/support
Were you able to resolve your issue?
Sincerely,ValerieDeveloper Support Engineer Infragisticswww.infragistics.com/support
Hello Valerie,
I was on holidays last week so I only could test your solution this morning, it seems to work I'll be back on it if I have further problems.
Thanks a lot for your help.
Regards and best wishes for this new year.
Thank you for sharing your solution.
Sorry for the late answer, I found a solution by adding a partial class with my data where I put a property that represent what I need.
With this I can use a TextColumn and filter it.
Thanks for your help.
Do you have any other questions on this matter?
The issue is that the underlying value of the cell does not contain the full text that is populated during the display using the converter. Therefore when filtering, the filter is taking the value displayed in the listbox (ex Nom + Prenom) and trying to compare this to the partial value in the cell (ex Nom). Using MVVM the idea would be that your data is represented as it is maintain in your model and then the classes can be refactored in your ViewModel to support binding to the view. This would be your best and simplest approach to resolving this issue.
Please let me know if you have any questions.
Thanks for your response. But I can't change my data representation, so I tried a last solution by taking one of yours (http://ko.infragistics.com/community/forums/p/59382/301863.aspx#301863). It could be a solution for me but I have some troubles with it :
- The filters are not applied correctly,
- The ClearFilters button doesn't works,
- The empty data text appears some times,
- The select all checkbox behavior doesn't works.
What am I doing wrong ?