Jump to content

Working with TUniDBGrid : why the focused line is selected ?


mderie

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

I've a part of the solution thanks to a nice guy on Stack Overflow forum :

 

http://stackoverflow.com/questions/32134350/extjs-grid-why-the-focused-line-also-selected-it

 

Indeed, I need to change the default value of checkOnly like in the following ExtJS code, but I'm a bit lost on how to do it :(

 

selModel: {
selType: 'checkboxmodel',
checkOnly: true
},

Link to comment
Share on other sites

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...

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...