Categories | Question details Back To List | ||
selecting row in tree and scrolling Hi, i am using the selectRowById on a treegrid and when i select the a folder it is highlighting the folder but isnt opening the folder and isnt scrolling to the item openItem method to open it but i cannot get it to scroll down the tree to show it in view thanks Answer posted by Alex (support) on Feb 16, 2009 04:54 Hi, You can try to use both methods in order to select and open folder: treegrid.selectItemById(id); treegrid.openItem(id); Answer posted on Feb 16, 2009 05:04 hi thanks for the reply i am actually using both methods but it does not scroll down to the selected row - the row is being selected and the folder is being highlighted but the scroll bar remains at the top of the tree and doesnt scroll to the highlighted item thanks Answer posted by Alex (support) on Feb 16, 2009 06:30 Scrolling grid to the selected row is the default behaviour (if row is open). Could you please provide any sample to recreate the issue (if it contains grid|treegrid js libraries, please send it at support@dhtmlx.com ) Answer posted on Feb 16, 2009 06:47 hi, thanks for the reply. in fact your answer just fixed it... you stated that it is default if the row is open... in your previous example and in my code the select row was occuring before open item. therefore i switched the open item to occur first and then the select row and it works fine now thanks for your help Answer posted by Alex (support) on Feb 16, 2009 07:53 Hi, Sorry for the misleading information. Yes, an row must be displayed in order to scroll a treegrid to its position. |