Within a project I have a grid bound to a Index collection which is generated from a proxy service
The grid currentlty displays 5 (of 20) fields ( first name , last name, activity type, Address, and date )
I need to be able to select a row and return an assoicated ID field which is part of the index collection. ID is an actual object and not the index of [0]... of the colleciton or row.
Any samples or suggestions would be appreciated.
In the past I have seen examples such as
Where this has not worked is that I only want to captrure one value I do not want to recreate or build a new collection . Also using this approach the variable is attempted to be set when the grid loads however it is currently setting it to null or no value so I assume something is amiss either in the code or the approach I am taking.
Any suggestions on how to capture just one value of the collection which is not visually rendered in the grid vs rebuilding an entire collection would be greatly appreciated.
I am currently using the WPF desktop UI controls Q2 2010 ( 2010.1.603.35 )
Thank you
Randy
private void QueryActivities() |
{ |
QueryClient qc = new QueryClient("BasicHttpBinding_IQuery"); |
QueryFilter filter = new QueryFilter(); |
filter.CallForService = cfsCB; |
filter.NCICReturn = false; |
filter.RMSQuery = false; |
filter.DLSwipe = false; |
filter.Booking = false; |
filter.ArrestReport = reportCB; |
filter.CustodyReport = reportCB; |
filter.CitationReport = reportCB; |
filter.FieldInterviewReport = reportCB; |
filter.IncidentReport = reportCB; |
filter.IncidentSupplimentReport = reportCB; |
var actresult = qc.GetFilteredActivityIndex(filter); |
this.actGridView.ItemsSource = actresult; |
} |
I need to be able to select a row and return an assoicated ID field which is part of the index collection. ID is an actual object and not the index of [0]... of the colleciton or row.
Any samples or suggestions would be appreciated.
In the past I have seen examples such as
//placed in Window initialization |
this.actGridView.Loaded += (o, e) => |
{ |
this.actGridView.SelectedItems.CollectionChanged += new NotifyCollectionChangedEventHandler(SelectedItems_CollectionChanged); |
}; |
void SelectedItems_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) |
{ |
if (e.Action == NotifyCollectionChangedAction.Add) |
{ |
var person = e.NewItems[0] as People; |
//PeopleView.SelectedPeople.Add(person); //writes selected values to selected people when row is selected. |
myID = person.uniqueID; |
} |
} |
Any suggestions on how to capture just one value of the collection which is not visually rendered in the grid vs rebuilding an entire collection would be greatly appreciated.
I am currently using the WPF desktop UI controls Q2 2010 ( 2010.1.603.35 )
Thank you
Randy