View Full Version : support for 'reference grabbing'

30 Jun 2010, 2:33 AM

I'll be creating an application with a grid, in which the user, while editing the content of a cell in a grid, can perform 'reference grabbing', by which I mean use the cursor keys or a drag of the mouse to grab a range of cells. The name of this cell range (e.g. "C5:D11") will be inserted into the cell being edited, at the location of the text cursor, while the range will be highlighted on the grid using colored dotted borders or marching ants.

I've been searching the documentation and examples for indications of how easy this might be, but haven't found anything explicitly supporting it yet, so I'm assuming I'll have to code this up from scratch. Do you think it will be easy or hard to add functionality to the grid like this? I've written this for desktop GUI grids twice, but this is my first attempt at a web-based implementation.

The other aspect of my app is that the expressions users enter in cells will have to be evaluated server-side, and the results of those evaluations displayed in the grid, but I'm guessing this part is pretty straightforward.

Many thanks if anyone has suggestions or advice.

30 Jun 2010, 3:13 AM
That's very ambitious. I'm assuming you have a thorough understanding of Javascript, DOM etc. Because it's not going to be easy.

I think someone has written a mousedown/swipe selection model for the grid, and posted it as a UX, but IIRC, that was for rows. I don't know if they did it for cells.

You will have to search the forums to dig up their work.

1 Jul 2010, 1:16 AM
Hey Animal,

I'm a veteran coder but this is my first Javascript evar, so your input on that is very much appreciated. Obviously our first user stories are less ambitious than that, and we'll adjust our plans accordingly based on how that goes, but I wanted to throw out some queries about various grid components ahead of time, so we can make a kind-of-informed choice between them.

I'll chat with the team about how we should maybe be modifying our user-interface behaviour to be more 'swimming with the current' on a web platform.

Best regards,


1 Jul 2010, 1:32 AM
OK, then that task should be deferred until you are well versed in OO javascript technique, and DOM structure and ExtJS structure.

It's definitely possible, but will required some advanced techniques.

1 Jul 2010, 2:22 AM
Fair enough. I'm absolutely taking your advice on board. Thanks!