jQWidgets Forums
Forum Replies Created
-
Author
-
Ok, maybe i need to ask a more direct question, then – rather than arguing about what i *should* be able to do.
Is there any way to access the LOCATION of a particular cell? What if i don’t want to actually allow editing to a cell – i just want to display something in a floating div next to it when the user clicks on it. How do i figure out where a cell is so that i can do that?
Again – i’ve already gotten something working by simply rewriting a few of your base functions to return the DIV element in question. However, i realize that if i use more of the features of the grid, it’s unlikely that this will work. I’d rather use your suggestions, since i don’t want to break anything with my rewriting of core functions.
Ok, but shouldn’t i still be able to retrieve the DIV that’s responsible for the event during a beginedit / endedit?
I’ve already edited the JS for the grid to allow the getCell() method to return the element in question – but it’s just a best guess, and i bet there are going to be circumstances where the element i return there is wrong. I’m calculating the column index, based on which columns are hidden or visible, and then using the this.table[0].rows[rowIndex].cells[colIndex] to get the element in question and tack it onto the object being returned by getCell. That lets me access the element in the events.
I need this in my particular case because i want to show a secondary floating div just below the cell that’s being edited. Without having access to the element responsible for the event, there’s no way to snap another div to it.
My little hack job might cause problems down the road, but at least it gets me what i need right now. Please consider building that into future releases. I realize that some “cells” (in the form of divs) might be reused later – but they should available during the events at least.
-RP
In the event info passed in for things like cellbeginedit, why are all the target properties set to the div which represents the entire grid?
-
AuthorPosts