Freeze Columns to Left of DataGrid
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Freeze Columns to Left of DataGrid
Hello all,
I am trialling RunRev at present, and feeling my way with the new 'DataGrid' control.
Many of the grid controls I use in the web world (Nitobi, ExtJS etc) have properties that allow you to freeze a fixed number of columns to the left side of the grid allowing you to maintain a point of reference when you scroll to fields to the right of the grid. In Nitobi for example they have a property frozenleftcolumncount="2", which would freeze scrolling from the second column. In StarOffice or Excel it is referred to as Freeze or Freeze Columns.
I have nosed around in the Inspector for the DataGrid to no avail - I guess it may perhaps be a 'custom' Column Behaviour. I don't know.
Like most men, I am bearly able to find my car keys in the morning, so I might need someone to point out the obvious to me on this occasion.
Thank you, in advance of your advice - Kind regards, Andrew
I am trialling RunRev at present, and feeling my way with the new 'DataGrid' control.
Many of the grid controls I use in the web world (Nitobi, ExtJS etc) have properties that allow you to freeze a fixed number of columns to the left side of the grid allowing you to maintain a point of reference when you scroll to fields to the right of the grid. In Nitobi for example they have a property frozenleftcolumncount="2", which would freeze scrolling from the second column. In StarOffice or Excel it is referred to as Freeze or Freeze Columns.
I have nosed around in the Inspector for the DataGrid to no avail - I guess it may perhaps be a 'custom' Column Behaviour. I don't know.
Like most men, I am bearly able to find my car keys in the morning, so I might need someone to point out the obvious to me on this occasion.
Thank you, in advance of your advice - Kind regards, Andrew
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
Hi,
There is not a way to lock columns in the data grid. You would need to create two data grids and keep them in sync in order to accomplish this right now.
There is not a way to lock columns in the data grid. You would need to create two data grids and keep them in sync in order to accomplish this right now.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
Freeze Columns to Left of DataGrid
Thank you for the advice Trevor,
You might assume a user would like to `freeze` a particular column (for example: business name) so when they scroll 10 fields to the right to (for example: telephone) they have a sound point of reference when reading the presented data --- or ---- you might prefer to allow a user to make the freeze decision for themselves by selecting a column header and clicking a button to toggle the `freeze` settings of the grid. In the second and most desirable scenario, programatically managing two DataGrid objects would I imagine be very difficult, as each would need to change its number of displayed columns on the fly, as well as maintain row scrolling syncronisation.
Trevor, hats off to you (I believe you coded the DataGrid library). I believe I read that in another post.
I do have several more observations of my use of the object, and those in competing environments.
1. why no Database section in the Inspector for the DataGrid? I would have thought it logical to link a recordset from the Database Query Builder to a DataGrid, after all the DataGrid does present multi-row (multi record) representations of data.
2. DataGrid aggregate functionality. Particularly when dealing with financial data - having aggregate (sum, count, avg etc) built in to the footer row of the DataGrid can save endless SQL calls. You can imagine how useful this is particularly for Numeric column types. For example Nitobi Grid has a parameter named showSummary for columns you wish to total (sum).
I do hope my feedback is useful.
Once again, thank you for replying to my post.
Kind regards, Andrew
You might assume a user would like to `freeze` a particular column (for example: business name) so when they scroll 10 fields to the right to (for example: telephone) they have a sound point of reference when reading the presented data --- or ---- you might prefer to allow a user to make the freeze decision for themselves by selecting a column header and clicking a button to toggle the `freeze` settings of the grid. In the second and most desirable scenario, programatically managing two DataGrid objects would I imagine be very difficult, as each would need to change its number of displayed columns on the fly, as well as maintain row scrolling syncronisation.
Trevor, hats off to you (I believe you coded the DataGrid library). I believe I read that in another post.
I do have several more observations of my use of the object, and those in competing environments.
1. why no Database section in the Inspector for the DataGrid? I would have thought it logical to link a recordset from the Database Query Builder to a DataGrid, after all the DataGrid does present multi-row (multi record) representations of data.
2. DataGrid aggregate functionality. Particularly when dealing with financial data - having aggregate (sum, count, avg etc) built in to the footer row of the DataGrid can save endless SQL calls. You can imagine how useful this is particularly for Numeric column types. For example Nitobi Grid has a parameter named showSummary for columns you wish to total (sum).
I do hope my feedback is useful.
Once again, thank you for replying to my post.
Kind regards, Andrew
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
Yes, this would be rather tricky. I understand how freezing columns would be beneficial. If you are familiar with RQCC I would recommend filing an enhancement request for this. That can help Rev track how many developers would find this useful and help prioritize it.In the second and most desirable scenario, programatically managing two DataGrid objects would I imagine be very difficult, as each would need to change its number of displayed columns on the fly, as well as maintain row scrolling syncronisation.
Thanks.Trevor, hats off to you (I believe you coded the DataGrid library). I believe I read that in another post.
I'm not familiar with the database query builder myself and Rev handles the IDE integration. This is just the first release of the data grid though so there will most likely be improvements and additions as we move forward.why no Database section in the Inspector for the DataGrid?
Would having properties of the data grid that returned the sum/count/avg/etc for a column be adequate for rolling your own footer? Or for your needs would a footer need to be automated?DataGrid aggregate functionality.
It sure is. As I mentioned above, it wouldn't hurt to log enhancement requests that mention what features you would like and why you would like them (details are good). That way other developers can vote and add comments as well.I do hope my feedback is useful.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
Freeze Columns to Left of DataGrid
Thanks Trevor,
I won't at this time attempt to code the freeze column behaviour using two DataGrids. I am not that keen, or indeed wise. I would probably just update a text field placed at the top of the DataGrid with some key field in the highlighted row in the DataGrid to remind the user of some key snippet of the record as they scroll to the far right of the grid.
Thanks again for your interest.
Kind regards, Andrew
As I am new to Revolution (24 days left on my 30 day trial) I was unfamiliar with RQCC, but dug around and found what you were referring to. Probably worth noting for other readers RQCC = Revolution Quality Control Center located at http://quality.runrev.com/qacenter . Yes, I would be happy to lodge an enhancement request in the RQCC and perhaps on the Feature Request section of this forum. I will accumulate my thoughts on the data grid in a .pdf over the next few days and post when I have an opportunity this week.Yes, this would be rather tricky. I understand how freezing columns would be beneficial. If you are familiar with RQCC I would recommend filing an enhancement request for this. That can help Rev track how many developers would find this useful and help prioritize it.
Personally, I would prefer the footer to be built in to the control (or group - as I believe it is in essence a group), and there be a check box in the `Columns` section of the `Inspector` for the `DataGrid` that for example might say `Display Summary` (meaning display footer) and additionally a drop list of available aggregate functions for the `Column Type` of that particular column. So contextually if you had a `Column Type` of Text you could choose from aggregate functions say (count), but for a `Column Type` of say Numeric you may have available aggregate functions of (Avg, Min, Max, Mean, Sum etc etc). The component would do much of the work usually associated with looping through record sets to crunch numbers and would replace repeated SQL calls to update aggregate functions.Would having properties of the data grid that returned the sum/count/avg/etc for a column be adequate for rolling your own footer? Or for your needs would a footer need to be automated?
I won't at this time attempt to code the freeze column behaviour using two DataGrids. I am not that keen, or indeed wise. I would probably just update a text field placed at the top of the DataGrid with some key field in the highlighted row in the DataGrid to remind the user of some key snippet of the record as they scroll to the far right of the grid.
Thanks again for your interest.
Kind regards, Andrew
Re: Freeze Columns to Left of DataGrid
I am new to Rev and have been going through as many forum questions as possible. I am using a DataGrid and having a total footer with the option to choose which columns to total would be perfect for my project. Is there any new information on handling this property? Right now I have a second dg lined up at the bottom of the data dg with the totals going in there. However, scrolling the two together seems unlikely from the forums (I did manage to get multiple fields to scroll together with some success for the same purpose). Right now my dg has 23 columns, only some of which need totaling. As I improve my knowledge and program, there will be at least thirty possible columns that I would like the user to be able to re-arrange, resize (easy-enough), and show or not.
Any advice in addition to the idea of having a "heads up display" for showing totals would be great.
Thanks,
E
Any advice in addition to the idea of having a "heads up display" for showing totals would be great.
Thanks,
E