I have two grid let say
grid a and
grid a is (1, 2, 3, 4, 5, ... 50) and in
grid b (3, 5, 10, 25) .
I need when I click row with value 10 in
grid b , then
grid a will automatically scroll to row with value 10 too. In
UITableView there are
scrollToRow to do this but I can find similar method like that in Shinobi Data Grid. How to do that? Thanks in Advance
I have this code to make
grid a go to the top when
grid b is clicking :
gridA?.setContentOffset(CGPoint.init(x: 0, y: 0), animated: true)
But its not still solve my problem. I cant get a specific point for row with specific value.
Edit 2 :
I implement some code from UITableView but its still not working. Below my code now :
let cell = gridA?.visibleCell(atCoordinate: gridCoordinate)
var gridCenterPoint : CGPoint = (gridA?.contentOffset)
gridCenterPoint.y += gridA.frame.size.height / 2
gridA?.setContentOffset(CGPoint.init(x: 0, y: (cell?.center.y)! - 65), animated: true)
I put this code in
func shinobiDataGrid(_ grid: ShinobiDataGrid!, didTapCellAtCoordinate gridCoordinate: SDataGridCoord!, isDoubleTap: Bool) . When I click value on grid b , grid a will scroll but still not in right value/same value.