PDA

View Full Version : New Grid Class



Tom Murphy
23-Jun-2009, 08:04 PM
Hi DAW

I notice on the forum over the pass week or so there has been an increase in the number of posts about grids with recommendations for other controls, we ourselves have been looking at the CodeJock Report Control.

With the next release, 15.1, due to have a new native grid control it would be nice to get a general overview of what it will do i.e. multiline, better grouping, handle large volumns of data (non db-aware), better scrolling for the db-aware version etc.

I know that DAW like to keep their new stuff wraps until the last minute (normally the alpha release) but it would be nice to see some details on this new class. :)

Gregg Finney
23-Jun-2009, 08:23 PM
Hi DAW

I notice on the forum over the pass week or so there has been an increase in the number of posts about grids with recommendations for other controls, we ourselves have been looking at the CodeJock Report Control.

With the next release, 15.1, due to have a new native grid control it would be nice to get a general overview of what it will do i.e. multiline, better grouping, handle large volumns of data (non db-aware), better scrolling for the db-aware version etc.

I know that DAW like to keep their new stuff wraps until the last minute (normally the alpha release) but it would be nice to see some details on this new class. :)
Hello Tom,
We have a real nice ListView Class available. You can check it out at http://www.visualdataflexdeveloper.org/index.php?option=com_content&view=section&layout=blog&id=1&Itemid=3 Has Groups, Headers, Subtitles and Footers. Etc.

Data Aware also with Full DataDictionary support.


Gregg Finney

Tom Murphy
23-Jun-2009, 09:08 PM
Hi Greg

Thanks the reply, I have looked at your control and it does look very nice. As you point out there are a number of controls out there to choose from. With the next release containing a native grid control it would be nice to know what it's going to be able to do so we can compare it with the other controls.

Garret Mott
23-Jun-2009, 10:05 PM
Hi All -

I too would love to hear something about it.

I have several concerns about using a mix of controls (as good as they may be). First there's the learning curve: what works this way in one control is done differently in another, different properties, etc. The other one is keeping the look & feel the same between different controls. Having one with lots of eye candy & another that's plain can look awkward.

My hope is that the new grid will have both bound & unbound modes, as well as searching, so it can replace the grid, dbGrid & dbList.

As I've said in another thread, I can dream, can't I?

Chris Spencer
6-Jul-2009, 04:22 AM
If there is to be a new grid class in 15.1 what if any feedback are we able to provide?
or is DAW going to provide what they "think" we need?

I would like to reorder on any column to be an option (without need of an index).

Peter Crook
6-Jul-2009, 07:17 AM
If there is to be a new grid class in 15.1 what if any feedback are we able to provide?
or is DAW going to provide what they "think" we need?

I would like to reorder on any column to be an option (without need of an index).
Chris,

How can you order anything, let alone reorder it, without an index?:confused:

Peter

Garret Mott
6-Jul-2009, 09:45 AM
Chris,

How can you order anything, let alone reorder it, without an index?:confused:

Peter

Hi Peter -

Well - some of the OCX/.net grids out there will reorder the displayed columns w/out an index. This means that grabbing the next set of records is a 2 step operation (maybe 3?) - but they will do it & also do it remarkably quickly.

However, they are largely designed to work with recordsets: "Select * from Customer where WoodenBoatOwner = 'Y'". You can then sort by name, address, IsCrazy (that one's easy cause IsCrazy is always True in this case ;)) - that sort of thing.

Peter Crook
6-Jul-2009, 09:54 AM
Hi Garret

So they have to load all the records that satify the constraints or, if there is none, all the records in the file, and then index them (albeit internally - though that might involve disk read/writes if the index becomes larger than available memory) either on all columns initially or on one column when you select it. OK for small files or constraint sets and fast servers, but it doesn't sound very good for a default behaviour.

Peter

Garret Mott
6-Jul-2009, 10:23 AM
Hi Garret

So they have to load all the records that satify the constraints or, if there is none, all the records in the file, and then index them (albeit internally - though that might involve disk read/writes if the index becomes larger than available memory) either on all columns initially or on one column when you select it. OK for small files or constraint sets and fast servers, but it doesn't sound very good for a default behaviour.

Peter

Nope - they load the # of rows showing (I can only speak to TrueDBGrid from personal experience) - then go get the next batch. I think they must do it using several arrays to hold data - but am not sure.

Dennis Piccioni
6-Jul-2009, 11:12 AM
Hi Peter,

keep in mind that most (possibly all) other Grid classes expect to work with SQL databases, where you are always working with sets. It is also much more common in other programming languages to manually fill Grids from arrays, XML docs, etc, not necessarily from a database.

Chris Spencer
6-Jul-2009, 04:22 PM
Peter

I use SQL exclusively and we have a OCX grid that can load 100000 rows in 1-2 seconds.

It can work virtual, bound, unbound, treeview etc, very powerful, cell formatting is so many options etc

I must admit I was forgetting about the embedded database when I posted as I havent used it in over 10 years.

Stephen W. Meeley
6-Jul-2009, 04:33 PM
Peter

I use SQL exclusively and we have a OCX grid that can load 100000 rows in 1-2 seconds.

It can work virtual, bound, unbound, treeview etc, very powerful, cell formatting is so many options etc

I must admit I was forgetting about the embedded database when I posted as I havent used it in over 10 years.
Hi Chris,

Out of curiosity, what control are you using, what do you like and what is it missing?

chuckatkinson
7-Jul-2009, 07:45 AM
Peter

I use SQL exclusively and we have a OCX grid that can load 100000 rows in 1-2 seconds.

It can work virtual, bound, unbound, treeview etc, very powerful, cell formatting is so many options etc

I must admit I was forgetting about the embedded database when I posted as I havent used it in over 10 years.

Yes please let us know ... that's impressive performance. We are using the XtremeSuite ReportControl that the VDF Sig has graciously provided classes and wrappers. But the downside is performance when loading a large number of records.

Garret Mott
7-Jul-2009, 08:00 AM
Yes please let us know ... that's impressive performance. We are using the XtremeSuite ReportControl that the VDF Sig has graciously provided classes and wrappers. But the downside is performance when loading a large number of records.

My bet is on True DBGrid Pro (from Component One). However, I've been wrong before..... Oh so many times!

In a VB app I have at a client's, it will load a 5,000 record recordset & display the first 12 rows so quickly I haven't timed it - less than a second for sure, over a network & (even worse!) from an Access db.

Anders Ohrt
7-Jul-2009, 01:49 PM
How can you order anything, let alone reorder it, without an index?:confused:


If the grid knows there's an SQL back end, it can let the DB do everything for it. It would just do a Select, Order by <any fields>, Limit <number of displayable rows + 1 little buffer>. Server side, this is blazing fast.

Chris Spencer
7-Jul-2009, 04:53 PM
Hi Stephen
The control is itGrid.
This was an Australian company.
Unfortunately they shut up shop earlier this year.
However as long as the control works I will keep using it.
It is a fantasric control for an SQL backend.
I have a dataaware sub-class that I can use to replace a dbGRID
Allows much better end user control for data entry an review
The features are below (a moot point I guess)

Features


XP theme support
Printing and print preview - itGrid provides comprehensive print and print preview support including many print setup related properties, Page Setup and Cancel dialogs, and is fully customizable.
Sorting
Subtotalling
Simple to use column 'styles' determine column behaviour. Styles include CheckBox, Combo, DateTime, Default, ImageList, OwnerDraw, OwnerDrawCombo and UpDown
Advanced hierarchal capabilities. Perfect for displaying XML
Cell 'ranges' allow per cell (or range of cells) formatting including Alignment, BackColor, Font (Bold, Italic, Name, Size, Strikethru, Underline) and ForeColor
Dynamic column sizing and moving
Column 'ranges' allow easy setting of properties across multiple columns
String comparison method of text or binary can be suggested anywhere where string comparison is performed for better performance
Find method
Bound (OLEDB) and unbound modes

embedded itCombo Features:


XP theme support
CueText and LimitToList properties
Multiple columns
Can be used inside itGrid and standalone
Column styles including Default, ImageList and OwnerDraw
Simple new methods for loading data include FillFromArray, FillFromDataSource and FillFromString
Column 'ranges' allow easy setting of properties across multiple columns
String comparison method of text or binary can be suggested anywhere where string comparison is performed for better performance
Find method
TypeAhead (auto completion)
Clone method provides fast duplication of combo properties and items
Column headers

Peter Crook
8-Jul-2009, 09:28 AM
If the grid knows there's an SQL back end, it can let the DB do everything for it. It would just do a Select, Order by <any fields>, Limit <number of displayable rows + 1 little buffer>. Server side, this is blazing fast.
Thanks Anders, now I understand:)

Peter

TheCodeMonk
8-Jul-2009, 04:41 PM
We deal with sometimes enormous amounts of data in our canned retail application. One of the biggest problems with a client application running on a desktop connecting to an sql server is when you have to run it at a remote location through a VPN over a DSL connection. Even some of the best grids out there will take too long to load it all at once in a grid. (We load all the data at one time for searching and filtering purposes) Since we converted the application from VDF to .Net, there are a lot of things we like to see still happen that VDF did quite well, which is having a lookup with all the data. We didn't want to try to page the data, especially if they wanted to just type W and go to the Ws in that column. With the DSL VPN, some of those lookups can take 10 - 20 minutes to load when we are talking about a good 100,000 rows of data (lots of columns too, with pictures).

Way back a few years ago we get a whole package of controls from Developer's Express and their latest stuff has their XtraGrid using a LinqServerMode. LinqToSQL is one of the newest .Net technologies to connect to the SQL server and run queries against it in code... Anyway, they have this servermode feature that allows the grid to use the LinqToSql stuff to do all the heavy lifting. Those lookups over an even slower DSL VPN now load on the screen in about half a second. It still has all their nice grid features like filtering, sorting, and grouping and it works like the VPN wasn't even there and they were running locally. We ran the SQL perf tools to look at the queries it was throwing at the server for all the operations and it's quite amazing what they did with it. The grid has a feature where you click on the filter icon thing and it will drop down a list of all unique values for that column and you can just quickly click on one to filter that column by that value. In the background, instead of just querying the already retrieved data, it just runs an SQL query to get the distinct values and displays that. So even though it may not have retrieved all the rows, it can still show you what values are present in that column.

It's quite slick and maybe DAW can look at that stuff to see how make it work in their stuff. Although, it would be easier if they just support .Net. ;)

Dennis Piccioni
8-Jul-2009, 05:39 PM
So, if I understand this correctly, the speed improvement is basically obtained by using separate SQL queries that return a small targeted data set for each lookup.

LINQ is sweet for coding, but ultimately, the LINQ code is converted to a raw SQL statement (you can even see that by looking at CLR code via reflector), albeit potentially a highly optimized one.

John Tuohy
9-Jul-2009, 11:58 AM
Tom and all,

We are currently researching our Grid options. We recognize that, particularly with grids, the direction that we take impacts your short and long term planning. As soon as we reach a decision, we will inform the community. This will definitely not be one of those "surprise - here it is in alpha" situations.

-John

Garret Mott
9-Jul-2009, 01:14 PM
Tom and all,

We are currently researching our Grid options. We recognize that, particularly with grids, the direction that we take impacts your short and long term planning. As soon as we reach a decision, we will inform the community. This will definitely not be one of those "surprise - here it is in alpha" situations.

-John

That's great news - thank you John

Todd Forsberg
9-Jul-2009, 07:33 PM
I am also using TrueDbGrid from ComponentOne. I like it and it works nice, but we have only used it for small number of records (less than 1000).

Tom Murphy
10-Jul-2009, 12:29 AM
Thanks John, good to hear.

Chris Spencer
10-Jul-2009, 01:23 AM
Thanks for that update John

TheCodeMonk
10-Jul-2009, 10:01 AM
So, if I understand this correctly, the speed improvement is basically obtained by using separate SQL queries that return a small targeted data set for each lookup.

LINQ is sweet for coding, but ultimately, the LINQ code is converted to a raw SQL statement (you can even see that by looking at CLR code via reflector), albeit potentially a highly optimized one.

Yes, everything that LINQ does is converted to an optimized SQL query that is executed at run time. When the grids are concerned, it's still paging the data, but the functionality that would have a dependancy on the entire set of data, still works because it can generate the SQL queries in the background.

The reality of it was realized when a customer was using our system over a wireless VPN and didn't notice any difference in speed. We thought for sure it was going to fail...

Dennis Piccioni
10-Jul-2009, 01:17 PM
Sweet!

Tom Murphy
19-Oct-2009, 12:42 AM
Hi John

Just wondering how you were getting on with the new grid.

John Tuohy
27-Oct-2009, 01:45 PM
Tom,

See New Grids in Visual DataFlex 2010 (http://support.dataaccess.com/Forums/showthread.php?p=199751#post199751) for more information about are grid plans and progress.

-John