Jump to content

TuniDBGrid questions


magosk

Recommended Posts

The DB grid is a key component for us, and what I have seen so far with TuniDBGrid looks very good, e.g. the built in paging feature in web mode.

 

A. Can you modify the page control texts ('Page', 'of') in some easy way (we have our web application available in several langauges)? If not, that would be a feature request from us. Note that you might need some more space in the page control (either auto-adjusting, or allowing say 7-8 characters for the "Page" translation and 3-4 characters for "of" to cover the commonly used languages)

 

B. For column sizing, we see three main approaches (that would suit our application):

  1. Using resizable columns and remembering the user choices. No automatic adjusting to screen size, horisontal scrollbar shown when needed. This looks possible with uniGUI (although I guess you would have to implement the "remembering" yourself...).
  2. Having some columns of fixed size, and the rest automatically adjusting (proportionally) to the available size. No horizontal scrollbar (except perhaps if not event the fixed fields fit).
  3. Having the grid autosize the columns to fit the longest visible text (possibly still with some fixed-size columns), and having a horisontal scrollbar only if not possible to fit within the available grid size.

Are the last two options available in TuniDBGrid somehow? I saw a post mentioning that there was a logged issue #555 for autosizing. What's the status for this? (Is your issue tracker publically available somewhere btw?)

 

C. We have a special case where the user can follow real-time status updates in some database tables. With a TuniDBGrid with dgRowSelect as an enabled option I wrote the following test code:

procedure TMainForm.UniTimer1Timer(Sender: TObject);
var
 OldID: Integer;
begin
 OldID := ClientDataSet1ID.Value;
 ClientDataSet1.DisableControls;
 ClientDataSet1.Locate('ID', Random(3) + 1, []);
 ClientDataSet1.Edit;
 ClientDataSet1Name.AsString := ClientDataSet1Name.AsString + '*';
 ClientDataSet1.Post;
 ClientDataSet1.Locate('ID', OldID, []);
 ClientDataSet1.EnableControls;
end;

(in the real world case it would probably be a table refresh instead). This updates very smoothly in the VCL case, and the cell contents do so in the web case as well, but the row selection "flickers" each time the timer is updated. Is this possible to avoid?

Link to comment
Share on other sites

  • Administrators

The DB grid is a key component for us, and what I have seen so far with TuniDBGrid looks very good, e.g. the built in paging feature in web mode.

 

A. Can you modify the page control texts ('Page', 'of') in some easy way (we have our web application available in several langauges)? If not, that would be a feature request from us. Note that you might need some more space in the page control (either auto-adjusting, or allowing say 7-8 characters for the "Page" translation and 3-4 characters for "of" to cover the commonly used languages)

 

You can set the UniServerModule->ExtLocale parameter to a proper value.

 

B. For column sizing, we see three main approaches (that would suit our application):

  1. Using resizable columns and remembering the user choices. No automatic adjusting to screen size, horisontal scrollbar shown when needed. This looks possible with uniGUI (although I guess you would have to implement the "remembering" yourself...).
  2. Having some columns of fixed size, and the rest automatically adjusting (proportionally) to the available size. No horizontal scrollbar (except perhaps if not event the fixed fields fit).
  3. Having the grid autosize the columns to fit the longest visible text (possibly still with some fixed-size columns), and having a horisontal scrollbar only if not possible to fit within the available grid size.

 

1. Yes you must implement saving column sizes.

2. I think you can achieve this by some code.

3. Possibly we can implement a similar feature it in next versions.

 

 

Are the last two options available in TuniDBGrid somehow? I saw a post mentioning that there was a logged issue #555 for autosizing. What's the status for this? (Is your issue tracker publically available somewhere btw?)

 

Issue tracker is not publicly open. There are many requests to make it open. We will see.

 

 

C. We have a special case where the user can follow real-time status updates in some database tables. With a TuniDBGrid with dgRowSelect as an enabled option I wrote the following test code:

procedure TMainForm.UniTimer1Timer(Sender: TObject);
var
 OldID: Integer;
begin
 OldID := ClientDataSet1ID.Value;
 ClientDataSet1.DisableControls;
 ClientDataSet1.Locate('ID', Random(3) + 1, []);
 ClientDataSet1.Edit;
 ClientDataSet1Name.AsString := ClientDataSet1Name.AsString + '*';
 ClientDataSet1.Post;
 ClientDataSet1.Locate('ID', OldID, []);
 ClientDataSet1.EnableControls;
end;

(in the real world case it would probably be a table refresh instead). This updates very smoothly in the VCL case, and the cell contents do so in the web case as well, but the row selection "flickers" each time the timer is updated. Is this possible to avoid?

 

 

 

 

To avoid flicker your grid must be big enough to hold all its contents without a need for scroll bars.

Link to comment
Share on other sites

You can set the UniServerModule->ExtLocale parameter to a proper value.

Thanks for your reply (I missed it at first, hence my slow reply)! We host a service for clients in various countries, so we need to adjust language on a per session basis, so unless you can override locale for the session we still need the text to be adjustable. We have a (base) language converter component who does the job of translating selected component properties from a language file, for which we would write a "uni"-specific descendant. But it would need a string property it could recognize and change.

 

To avoid flicker your grid must be big enough to hold all its contents without a need for scroll bars.

The selected row still flickers each timer strike even if it is some other row that changes, perhaps due to some "data change" event from the data source. It would be nice if it could be avoided.

Link to comment
Share on other sites

  • 8 years later...
42 minutes ago, RobertoLopes said:

If multiselect is true you are doomed just as I am. With multiselect  = false and no loading mask it will not flick at all.

Hello,

The above post was created over 8 years ago!

What is your problem at the moment?

Link to comment
Share on other sites

On 9/23/2020 at 3:20 PM, Sherzod said:

Hello,

The above post was created over 8 years ago!

What is your problem at the moment?

Ow I just sow the date. But the fact is that even today version 1535, if you select the option to multiselect and select just one row, it still flicks like crazy.

 

But the worse thing is that we have no event telling that the user is scrowing down on the grid and as the grid refreshes it will return to the currently selected row. So if you have 1000 lines, select the second and scrow down to the 500th line to find something and the query assiciated with the grid refreshes, you will return all the way up to the selected row.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...