Title: combogrid scroll to value on dropdown Post by: gurpal2000 on September 13, 2012, 04:26:19 PM I have a combogrid with 100 items and after selecting a value about half way, if i dropdown again, the value is not in the data view (item is highlighted though).
How can i get the datagrid to scroll to the selected/highlighted item? thanks Title: Re: combogrid scroll to value on dropdown Post by: stworthy on September 13, 2012, 07:41:53 PM The grid retain its scroll position unless you change its value. So when dropping down the grid, the selected row will be in visible area.
If you want to scroll to the selected row, call 'selectRecord' or 'selectRow' method to select that row again when the grid is visible. Title: Re: combogrid scroll to value on dropdown Post by: gurpal2000 on September 14, 2012, 12:44:58 PM So in my code i have like a Next/Previous button which allows a logical navigation thru the contents of the combogrid. It's time based data you see.
In my button i do something like: Code: $('#comboSearch').combogrid('grid').datagrid('selectRow', newindex); and this fires off a 'onselect' event. If i drop down the grid, why would i call selectRow again? that will fire off another onselect no? I've used selectRow but the highlighted item does not scroll into view. The combogrid example/demo you have also exhibits this behaviour) Title: Re: combogrid scroll to value on dropdown Post by: stworthy on September 14, 2012, 06:00:48 PM When datagrid is hidden, calling 'selectRow' method will highlight the specify row but cannot scroll to this row. I don't known where your navigate buttons are placed. Maybe making them in the datagrid toolbar is a good idea. Also, you can directly bind the keydown and keyup events on combogrid textbox to implement the record navigation functionality.
|