Hi Team,
I am currently using XamMultiColumnComboEditor inside XamGrid as I am new to WPF I not able to implement following things:
1. Enabling alternate Row Colors
2. Displaying multiple column data in the DisplayMemberPath
3. Display Selected items in XamMultiColumnComboEditor as Tooltip once the control is disabled (as the event like MouseEnter doesn't fire for disabled control)
- Can we use any cell event for XamGrid to fire and get selected data from the XamMultiColumnComboEditor and display in the tooltip?
4. Remove the Grid lines inside the Control (i.e. the lines between rows and columns)
5. Showing the full row as greyed out once the data is selected in the previous XamMultiColumnComboEditor, right now only the checkboxs are being unable for selection.Please help me with these issues. Thanks
Hello Piyush,The Ellipse could be added in code behind by going through the visual tree to find the SpecializedTextBox element and add the ellipse to its parent’s children. If you would like to do this when an item is selected it will look similar the code below:
private void XMCCombo_SelectionChanged(object sender, Infragistics.Controls.Editors.SelectionChangedEventArgs e) { if (e.AddedItems.Count >0) { SpecializedTextBox stBox = Utilities.GetDescendantFromType(sender as DependencyObject, typeof(SpecializedTextBox), false) as SpecializedTextBox; if (stBox != null && (stBox.Parent as Grid) != null) { Ellipse el = new Ellipse(); el.Stroke = new SolidColorBrush(Colors.Red); (stBox.Parent as Grid).Children.Add(el); } } }
You can also modify the code above to apply the changes based on some custom logic instead of just checking whether there is an item in the AddedItems collection.
Is there any way to do it through code?? - Handling ellpises for SpecializedTextBox.Actually I want to have ellipses in XamMultiColumnComboEditor
Hello Piyush,The PreviewKeyDown event could be handled when a Control key is down so the items in the drop down does not get focused:
private void XMCCombo_PreviewKeyDown(object sender, KeyEventArgs e) { if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))) { e.Handled = true; } }
The closing of the drop down when an item is clicked could be canceled in the DropDownPopulating event:
private void XMCCombo_DropDownClosing(object sender, CancelEventArgs e) { e.Cancel = true; }
You can modify the default template for the XamMultiColumnComboEditor located in the generic.xaml file at C:\Program Files (x86)\Infragistics\2016.2\WPF\DefaultStyles\XamComboEditor to display the ellipsis around the SpecializedTextBox.
Also, Maria can you help me with adding ellipsis in the specialized textbox once the number of items selected exceeds the box.