3.0.5

Scrollbars not working when using multiple girds

Hey

I've been searching the forums for some time now and haven't found anything yet that look like my problem or could provide a solution for it.

I have some places on my page where i have 2 grids, showing content wich is not related to eachother. At first the second table didn't show any scrollbars at all. I found out that i had to give them different id's. After that both grids showd fine but only the last grid was able to use the scrollbars. Using the scrollbars from the top grid, the data isn't scrolled, the bars move but the grid remains static, and i see 'scrip error' at the bottom of my screen.

Does anybody know why the top grid it's scrollbars aren't working the way they should?
I'm using php and echo'ing the html, also i use IE as browser.
Sipke Jan Sangers
December 15,
First off, enable error messages so you know what the error is. That alone should tell you what is going on. it soulds like you have made a mistake in your code and the error message will point you in the direction of where to look.
The first thing you have to do (and anyone else reading this post) when trying to write JavaScript code and debug it, is to enable JavaScript Errors. If you never see errors how are you going to know when and where something is going wrong?
Jim Hunter
December 15,
Thanks for the help Jim

I've put on the script debuggin now, and I can see the error, which is:
'getTemplate' is empty or no object.
I don't know much about the js file. But i'm guessing it has something to do with the selected object. Only the last created object is selected. I've already seen some solutions using
grid1.setProperty("selection/index",-1);
I know u can put this in a function, but I don't know when to make a call to this function, or where to put this code generally.
Sipke Jan Sangers
December 16,
No, it sounds like this is the reported error but it's not your problem. You have something else wrong with your code that is causing this error to be reported. There is no need to do anything special when you have more then one grid ona page, I do it all the time. All you have to do is make sure that each has it's own unique ID. You can see this in action in the Controls demo that Alex has, there are 3 grids on the page and they work independant of each other with no special code to allow this. I would need to see your code to know what you have set wrong. Can you post your code?
Jim Hunter
December 16,
I started working here with a colleague. He got fired but he altered the way we made our grids on the site. After i've put back the original code everything was fine again. I now have to add some functions to make the previous functionality work again.

My colleague had split up the code for showing a grid in a section where data allocation happened and one where property setting happened. Wrapped around in a php class.

I'll figure something out to make everything ok again. Thanks a lot for your help Jim Hunter.
Sipke Jan Sangers
December 19,

This topic is archived.

See also:


Back to support forum