Hi,
I use the mouse right click to select one field(column) by the following codes:
private void xamDataGrid1_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{ var labelPresenter = Infragistics.Windows.Utilities.GetAncestorFromType(e.OriginalSource as DependencyObject, typeof(LabelPresenter), true);
if (labelPresenter != null)
{ var clickedFieldName = ((DataItemPresenter)labelPresenter).Field.Name;
var field = xamDataGrid1.FieldLayouts[0].Fields[clickedFieldName];
xamDataGrid1.SelectedItems.Cells.Clear();
xamDataGrid1.SelectedItems.Fields.Clear();
xamDataGrid1.SelectedItems.Fields.Add(field);
}
From the UI, all the cells under the field has been in selected mode, from the codebehind I can't get all selected cells from the xamDataGrid1.SelectedItems.Cells.
Could you please help on how to get all cells for the selected field?
Thank you!
Hello,
I am just checking if you require any further assistance on the matter.
I have been looking into your question and I can suggest you look through the following forum thread where Peter has already provided a solution on how this can be achieved :
http://ko.infragistics.com/community/forums/t/45394.aspx
If you need any further assistance on this matter, feel free to ask.