Hi together , I need help, I need to position my grid focus and position to the "last active cell" before save data , a kind of action type "scroll to position" . Could you help me ? Thanks
The cell's javascript object has a method called ScrollToView() that you could call to make the grid scroll the cell into view.
The code would look something like this:
Sure, usually I invoke this method from client behavior, but, at the moment , I need to invoke this from server side. It's firing after addrowbatch mode. Any idea ? Thanks in advance
Helen, thanks for your help,,
at the moment I have the position before post (in Java script client side), but , I haven't any idea about "How to scroll to this position after postback" ..
The only way to do it on the server is by setting the DisplayLayout.ScrollTop and DisplayLayout.ScrollLeft properties. You would have to make an estimate at the right amount of scrolling to do based on the index of the active row. It probably would be quite hard to do it perfectly. I think it would be easier to just inject some clientside code into the page to use scrollToView() when the page loads after postback.