Hallo guys,
I'm using the latest version of smartGWTEE and I'm trying to implement the following feature: if we type CTRL+A all records in the grid get selected.
My implementation:
KeyIdentifier selectAllKey = new KeyIdentifier();
selectAllKey.setCtrlKey(true);
selectAllKey.setKeyName("A");
Page.registerKey(selectAllKey, new KeyCallback() {
public void execute(String keyName) {
myGrid.selectAllRecords();
}
});
Which works,I mean the records in the grid DO get selected, BUT the problem is: the whole page gets selected as well (marked in blue like when we select something on a text on a webpage)
Which is weird because I didn't set "canSelectText" anywhere in my application and the standard behaviour for smartgwt widget is false, and actually if I try to select some text on any widget I can't, it just appears selected when I press CTRL+A
So I'm asking myself, it possible at all to avoid this, or is it a native browser hot key (like CTRL+N for opening another window) which is impossible to disable?
Thanks in advance for your help
Laura
I'm using the latest version of smartGWTEE and I'm trying to implement the following feature: if we type CTRL+A all records in the grid get selected.
My implementation:
KeyIdentifier selectAllKey = new KeyIdentifier();
selectAllKey.setCtrlKey(true);
selectAllKey.setKeyName("A");
Page.registerKey(selectAllKey, new KeyCallback() {
public void execute(String keyName) {
myGrid.selectAllRecords();
}
});
Which works,I mean the records in the grid DO get selected, BUT the problem is: the whole page gets selected as well (marked in blue like when we select something on a text on a webpage)
Which is weird because I didn't set "canSelectText" anywhere in my application and the standard behaviour for smartgwt widget is false, and actually if I try to select some text on any widget I can't, it just appears selected when I press CTRL+A
So I'm asking myself, it possible at all to avoid this, or is it a native browser hot key (like CTRL+N for opening another window) which is impossible to disable?
Thanks in advance for your help
Laura
Comment