dragnilar / Databvase

A (sorta) lightweight query tool for MS Sql Server that makes usage of DevExpress to provide a rich user interface
3 stars 1 forks source link

Have Databvase Display Multiple Query Results Grids #7

Closed dragnilar closed 6 years ago

dragnilar commented 6 years ago

Databvase only displays one query results grid at a time. This means that if you fire off a query that returns two or more results sets (I.E. Select from table1, select from table 2), you only get the first tables worth of results back.

SSMS is capable of displaying multiple results. It would be nice if Databvase were able to capture this functionality.

dragnilar commented 6 years ago

This took longer than I would have liked. The main problem was finding a way to allow a user to adjust the heights of query grids stored in the results pane via the XtraLayoutControl.

The XtraLayoutControl is not very straight forward at providing functionality similar to whatever it is that Microsoft used for the results pane in SSMS. While the XtraLayout DOES expose this functionality, the user has to right click on a control and open up a customization form and then afterwords they are able to resize the grids. I feel like this requires too many extra steps.

When I have the time, I will revisit the XtraLayout, but for now I will be using this decedent of the vanilla Windows Forms table layout panel:

https://stackoverflow.com/questions/31069443/how-to-make-tablelayoutpanel-with-resizable-cells-like-using-splitter

In addition I will be adding a secondary view that allows you to add multiple grids as dockable panels so that you can move them around the app or onto a second monitor.

Still needs to be done:

dragnilar commented 6 years ago

The results tab can now show multiple results grids. This still needs some work however:

dragnilar commented 6 years ago

Another update -

Working on two things at once for this now:

A) Dock panel mode - All query results grids will be shown in dock able containers that can be pulled out of the window and docked anywhere on your screen. This mode has some limitations with downward scrolling, but this seems to be something that's even an issue in Visual Studio itself with dock panels...

B) WPF layout mode - This will replace the table layout mode used previously. This will fix the splitter resizing bugs.

dragnilar commented 6 years ago

WPF layout mode is almost "done". The most recent commit implements it but it needs some cleanup. Also exporting and printing are currently disabled. We need to add some functionality to allow the user to select a specific grid to export/print when there are multiples on screen.

Edit: Exporting and printing are enabled again for single grids. Need to implement some kind of dialog that lets you pick specific grids to export. It may also be beneficial to add a right click context menu to let you export like in SSMS.

Note - There is a bug with the right click context menu on the grids themselves. The right click menu does not disappear until you select something on it. We will need to add something to make it go away when clicking elsewhere on the screen. Otherwise it gets stuck on top of every other window and I can see that being very annoying.

dragnilar commented 6 years ago

Previous update resolves issue with the right click context menu.

The WPF layout clean up is in progress. The next commit will improve it twofold:

Side note - This entire enhancement has taken over 13 days, that's probably the longest any single one has ever taken for this project.

dragnilar commented 6 years ago

Small update with bd523822 - Images now display on the right click context menu for the grids. Also the way the grid buttons are built has been refactored.

dragnilar commented 6 years ago

55860be9 - 7 Days later..

dragnilar commented 6 years ago

b9eead8c and prior commits:

There may be bugs, but we will address them as we find them. I'm going to go ahead and close this.