I have a WPF application that contains a datagrid. It is bound to my List object "Orders" shown below.
public class OrderBlock
{
public Settings setting;
public List<Order> orders;
}
public class Order
{
public int Amount;
public string OrderID;
public string OrderIDDup;
public string Name;
public string NameDup;
public bool DupIDs;
// and some string, int fields
}
For reasons out of my control it is possible that there can be more than one OrderID, hence the OrderIDDup property. My datagrid by default shows just the OrderID and not the OrderIDDup.
What I would like to do is for the user to be able to click on the cell ID and for another window to load to show them the other ID as well as the two names and let them choose which ID should be used.
I have been reading that the WPF DataGrid doesn’t support this functionality of double clicking on a cell. So I am a bit lost as how i should start going about this issue. The other issue I can see is that as I am trying (being the operative word) to use a MVVM design how would this kind of event be exposed to my view model?
Also is this the best way to go about showing such information.
Any help would be great, Thanks, M
if (cell = oldcell && time < maxtime && count ==2) dostuff- WiiMaxxRowDetailsmay be another way of accomplishing this - James SampicaRowDetailsTemplateyou cause each row to act like an expander and expand more information when the row is clicked on. You can put twoTextblocks into the template to hold your additional information. Theres plenty of info on this on SO or a google search. - James Sampica