PDA

View Full Version : Unable to deselct a grid row



Tuom Larsen
13 Feb 2011, 8:37 AM
Hello,

I'm adding a row to a grid, like this:


var r = new ds.recordType({
foo: 'bar'
});
ds.add(r);

The problem is, that when I then select the newly created row it wont deselect if I click elsewhere. Them I reload the browser, the record is there and everything works.

Please, what am I doing wrong?

Mthor
13 Feb 2011, 4:36 PM
what happens if you click on another record?

also try clicking ctrl + left click on the row.

I bet if you add another record the rows will change. or add a listener to clearSealection

Tuom Larsen
14 Feb 2011, 1:40 AM
what happens if you click on another record?

It gets selected - everything works as expected, it's just that all the newly added rows, once clicked, remain highlighted.


also try clicking ctrl + left click on the row.

I have
singleSelect: true


I bet if you add another record the rows will change. or add a listener to clearSealection

If I add another record it behaves the same way - until I reload the store, it remains selected, after I clicked on it. Not even
clearSelection clears it.

I would thought that I the record I add is somehow misconfigured but I'm not sure how, or if at all....

Tuom Larsen
14 Feb 2011, 2:08 PM
The strange thing is, that if I "save()" and "reload()", it starts to working normally. But it doesn't really tell me why.... (besides, it calls the server twice, then.)

freeclassifieds
15 Feb 2011, 1:52 AM
now its working fine to me

Tuom Larsen
15 Feb 2011, 3:34 AM
No, it's not. (Spam?)