get scroll state by using column id

is their any way that i can get the scroll state by using the Id of column? both x and y’s value?

Sorry but I don’t follow. You can get the scroll state of datatable by using getScrollState API

http://docs.webix.com/api__scrollable_getscrollstate.html

it will return scroll state of the component.

yeah but it gets the present scroll state.
for example - if the table is not scrolled at all, then getScrollState returns x and y as 0.
unless their is click, through which we can get the clientX and clientY values and scroll .
The problem that i was facing is, i have 100 columns, as the page/dataTable loads i wanted the scroller to start from 20th column.

for now i got a temporary solution for horizontal scroll, ie., i’ll get the index value of the column from which the scroller should start and multiply it with 100 and pass the value as scrollTo(startValue, 0).

but is their another efficient solution?

Ok, it is more clear now.

You can use showColumn api to be sure that target column is visible
http://docs.webix.com/api__link__ui.treetable_showcolumn.html

Also, you can’t get the x-position of column, but you can use grid.config.columns[n].width to get width of n’th column. You can sum width of first n columns to get the necessary scroll position.

thanks it works :slight_smile: … but if their are few columns collapsed, summing the width to get the correct scroll state. who can i tackle this?