PDA

View Full Version : scroll multiselect to selected item



shahdollie
19 Sep 2010, 8:42 PM
hi everyone

I have a multiselect component in Ext js 3. I have a number of entries in it. Now i want to select an entry and scroll multiselect to make it visible to the user. I am able to select an entry but i cannot scroll multiselect.

I have used dataview component and i do this same function using following:
dataviewObj.container.dom.scrollTop = (42 * index);

but cannot implement this is multiselect.

Can someone please tell me how to achieve this with multiselect????

Thank you alot...regards

jay@moduscreate.com
21 Sep 2010, 5:03 AM
Do you want to scroll all selected items into the view? This doesn't make sense to me. It breaks typical UI selection patterns.

shahdollie
21 Sep 2010, 2:21 PM
hi thanks for replying. I want to select an item (that i m doing with select() method). But I want to scroll to that item in multiselect. I am able to scroll dataview (dataviewObj.container.dom.scrollTop = (42 * index);) but how to scroll multiselect? as scrolltop doesn't work.

Is there any way to do this????

Regards

shahdollie
30 Sep 2010, 2:30 PM
There is really no way to scroll multiselect programmatically ????????

Please somebody help...

Animal
30 Sep 2010, 11:19 PM
http://dev.sencha.com/deploy/dev/docs/?class=Ext.Element&member=scrollIntoView

shahdollie
3 Oct 2010, 1:57 PM
hi thanks for replying.

I tried to implement this function before also but i still dont get any result.

I tried following:

var multiselect = msForm.items.items[0];
multiselect.view.select(15);
multiselect.getEl().scrollIntoView();

Thanks alot for help
Regards

Animal
3 Oct 2010, 9:23 PM
And which scrollable element are you hoping that it will scroll to move that element into view??

Animal
3 Oct 2010, 9:23 PM
And anyway, you are asking for the MULTISELECT to be scrolled into view. Read it!

shahdollie
4 Oct 2010, 1:38 PM
hi animal thanks alot for help.... Sorry but i m not an expert in extjs.... i tried to add container in scrollIntoView() function like:


multiselect.getEl().scrollIntoView(multiselect.container, false);

I am not sure whether i m trying correct or not. but can u please give an example or so. I tried to implement in multiselect-demo.html only but i dont get any result.

Thanks alot for help
Regards