Jump to content

Working with TUniDBGrid : why the focused line is selected ?


Recommended Posts

Posted

Hi,

 

I'm discovering the TUniDBGrid componenent (actually I used the derived, TBMUniDBGrid because I need the multi selection),

and I have little trouble with the focused line which also check the checkbox on the left of the grid. Which bother me since

it is not meant to be like this.

 

==> I use the following grid options :

 

[dgEditing,dgTitles,dgIndicator,dgColumnResize,dgColLines,dgRowLines,dgRowSelect,dgCheckSelect,dgConfirmDelete,dgMultiSelect]

 

Bye

Posted

Hi mderie

 

I will check it and let you know about it.

 

Regards

 

PD: Please, TBMUniDBGrid's issues need to be reported on it's own post. We should verify it's our bug or not.

Posted

mderie

 

I would like you tell me what do you meant with focused row(English is not my native language). You are talking about to click on a row or to move the mouse over a row? If is the first case, it is the normal behavior in JS.

 

Regards

Posted

Hi (Bresler in particular :)

 

Sorry about the language I speak only french and english... No spanish sorry

 

I'll try to explain a bit more : when the grid receive the "Windows" focus (either by playing

with the mouse either with one or more hit of the TAB key), the grid highlight its first line

which is correct but it also check it which is not a good idea (the user may have to uncheck

it, checks other ones and then ask for an operation on the selected ones)

 

The dgCheckSelect option is about having the selection checkboxes on the left and is related

wrongly ? to the dgRowSelect one. It means today we can't have the former without the later !!!

 

What I need today is something like an OnEnter event where I should put this : grid.unselectAll();

But it does not work...

 

Bye

Posted

Found it alone :)

procedure ConfigGrid; override;
...

procedure TBMUniDBGrid.ConfigGrid;
begin
  inherited;
  JSConfigObject('selModel', ['selType', 'checkboxmodel', 'checkOnly', 'true']);
end;

Posted

Well bad news, there is a side effect : this implies that the "selectionchange"

event is no more fired !-( So the Bookmark list is not updated !!!

 

See :

 

procedure TBMUniDBGrid.JSEventHandler(AEventName: String;
  AParams: TUniStrings);
 

Still looking for an alternate solution...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...