Friday, April 18, 2014

GridView customization: choosing the approach

What I want to do is to allow user to choose which columns are visible and in which order they should be shown. For that I am going to create a window with a ListBuilder, like this:

The question is how to activate this functionality?

The options I have:

1. Add some visual element to the template

This could be nice, if I could find an elegant way to fit it into the current visual design (I am not saying it is amazing design now, I am saying that I might make it even worse).

This is something that I see in the Windows Explorer

The problem is, triggering this functionality should be as easy on touch screens as with the keyboard/mouse.
Second problem, it becomes an integrated part of the GridView and it is more difficult to make it optional.

2. Add the context menu to every GridView column

This is one of the possible answers for the previous item. Instead of adding the completely new visual element, I could just add a context menu, which already exists.

This works in Windows Explorer too, and this is something you can find in many other applications, like VisualStudio or MS Outlook.

While it solves the "design problem", it doesn't completely solves other issues.

3. Move this functionality completely out of the GridView and force developer to trigger it

In this case I simply implement the method that creates a window allowing to select/reorder columns, add it to the GridView and allow developer to call it when it is required.

You can see this approach in Windows services console or task manager.

This gives a developer a freedom to enable/disable this feature, implement it differently and choose how it is triggered.
Of course, you don't get this feature for free anymore.

Something that I noticed, for the task manager in Windows 8, they moved this feature out of the main manu and now it is accessible through the context menu.

4. Do not implement this functionality at all.

This is also an option. I can simply create an example code that demonstrates how to do it, and that's it.

The good thing, I spare myself a lot of problems, like localization of that window. The bad thing... Well, I don't think anyone will ever get that far to even see this example.

So I am still choosing. Any suggestions, anyone?

No comments:

Post a Comment