Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 8 of 8 total |
"Integral height" of TGrid Cells |
Tue, Feb 2 2016 6:31 AM | Permanent Link |
Uli Becker | Tim,
Please have a look at the attached screenshot. I hope I can make clear what I mean On the left you see a TGrid with a vertical scrollbar. The last visible row is displayed completely, the next row is not drawn, because there is not enough space. The grid on the right side is a fake - since I need colored cells (the color depends on other values of the current record) I couldn't use TGrid. It's just a TScrollPanel with 4 BasicPanels for each row, all created on the fly. As you see, the last visible record is partially drawn. Since I use very thin scrollbars (especially for tablets) the user might think that there are no more records in the left grid and might miss to scroll down. That's why I would prefer a partially drawn last (visible) record. What do you think about that? Thanks Uli Attachments: Clip7.png |
Tue, Feb 2 2016 12:20 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< The grid on the right side is a fake - since I need colored cells (the color depends on other values of the current record) I couldn't use TGrid. >> You *can* do colored cells dependent upon other values in the current row. It's just a little more work if the grid is bound to a dataset because you'll need to "look up" the row in a different dataset instance in order to avoid moving the row pointer in the grid. << Since I use very thin scrollbars (especially for tablets) the user might think that there are no more records in the left grid and might miss to scroll down. That's why I would prefer a partially drawn last (visible) record. >> I'll see what I can do, but what you're describing is supposed to be covered by the scrollbar functionality. That's one of the primary purposes of scrollbars, regardless of what Google/Apple decided to do in terms of making UI discovery worse. Tim Young Elevate Software www.elevatesoft.com |
Wed, Feb 3 2016 8:22 AM | Permanent Link |
Uli Becker | Tim,
> You*can* do colored cells dependent upon other values in the current row. It's just a little more work if the grid is bound to a dataset because you'll need to "look up" the row in a different dataset instance in order to avoid moving the row pointer in the grid Can you please elaborate? How would a lookup within the OnCellUpdate event work? Thanks Uli |
Wed, Feb 3 2016 2:43 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< Can you please elaborate? How would a lookup within the OnCellUpdate event work? >> As long as the two datasets have the same set of rows in the same sort order, you can use the Index property of the TGridCell to determine the cell index, add it to the TGrid.RowOffset property to determine the row index, and then use that row index to position the row in the lookup dataset (set the TDataSet.RowNo property to this row index) and grab the relevant data. It's a little convoluted, but it's the only way to avoid triggering recursive updates to the grid cells when moving around the row pointer in the dataset bound to the grid. Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 4 2016 3:17 AM | Permanent Link |
Uli Becker | Tim,
thank you - understood now. Uli |
Fri, Mar 11 2016 7:18 AM | Permanent Link |
Ivan Mihailov | Hi,
TGrid.RowOffset is a protected property and is not available within the OnCellUpdate event. Tim Young [Elevate Software] wrote: Uli, << Can you please elaborate? How would a lookup within the OnCellUpdate event work? >> As long as the two datasets have the same set of rows in the same sort order, you can use the Index property of the TGridCell to determine the cell index, add it to the TGrid.RowOffset property to determine the row index, and then use that row index to position the row in the lookup dataset (set the TDataSet.RowNo property to this row index) and grab the relevant data. It's a little convoluted, but it's the only way to avoid triggering recursive updates to the grid cells when moving around the row pointer in the dataset bound to the grid. Tim Young Elevate Software www.elevatesoft.com |
Fri, Mar 11 2016 8:00 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Ivan,
<< TGrid.RowOffset is a protected property and is not available within the OnCellUpdate event. >> Which version of EWB are you using ? It's not protected in the latest versions: http://www.elevatesoft.com/manual?action=viewprop&id=ewb2&comp=TGridControl&prop=RowOffset Tim Young Elevate Software www.elevatesoft.com |
Fri, Mar 11 2016 8:15 AM | Permanent Link |
Ivan Mihailov | Hi Tim,
you are right, my version of EWB is rather old, v.201 build 2 Sorry for that, I need to upgrade Ivan Tim Young [Elevate Software] wrote: Ivan, << TGrid.RowOffset is a protected property and is not available within the OnCellUpdate event. >> Which version of EWB are you using ? It's not protected in the latest versions: http://www.elevatesoft.com/manual?action=viewprop&id=ewb2&comp=TGridControl&prop=RowOffset |
This web page was last updated on Friday, November 1, 2024 at 07:01 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |