views:

195

answers:

1

Hi,

We have a WPF app that has a master/detail window, both being WPF Datagrids. When you select a row in the upper datagrid, the details are shown in the lower datagrid. I was wondering if there are any best practices from a UI perspective on how to deal with things such as:

  1. When the window first opens, no datarow is selected in the upper datagrid, and so no data can be displayed in the lower grid. Is this normal? Or is there typically an initial (top) row selected in the upper datagrid?
  2. When a row is selected and then deleted - does another row become the selected row? Or are you going to go to a no row selected state?
  3. If multiple rows can be selected, when happens in the lower datagrid? Show the last one selected? Or if delete is selected for these multiple objects, where is focus set? Or what row is selection?

I know there are a lot of different ways these things might be handled depending on how the app is written, but I wondered if there is some standard best practices? Or if there is some default operations for how the WPF datagrid might handle these cases?

thanks! Bill

+1  A: 

I think the first two considerations can come down to preference. I'd prefer to have the first row selected and its details shown when the window first opens -- this tells me, as a user, how this window works. Not sure how it works in WPF, but in Windows Forms, the datagridview pre-selected the top row by default (and getting it to stop doing that requires tricks).

When I remove a row, I personally prefer to go to a "no row selected" state, but I don't have much to back that up with in terms of "this is why you should do it". I just like seeing the empty "detail" view and lack of selection as confirmation that I did successfully remove the selected row.

The last point, however, I think is more clear-cut. If you have a master/detail relationship in views, you should not allow multiple selection. If you need the user to be able to perform actions on multiple rows of the master gridview, you can add some checkboxes to the rows to allow the user to pick a subset of rows to act on. But for the purposes of showing details, only one row must be selected at a time.

Anna Lear
Thanks Anna for your comments. Appreciate it and you make good points. UI is such an interesting area since it seems most folks have an opinion on it and best practices seem to be harder to pinpoint.
Bill Campbell