Unplanned
Last Updated: 11 Jul 2025 12:09 by ADMIN
Chris
Created on: 11 Jul 2025 10:58
Category: DataGrid
Type: Feature Request
0
DataGrid: Provide a public API for scrolling to a column

Currently, i can use the public method ScrollItemIntoView to scroll to an item in the DataGrid. 

I noticed you have an internal method: ScrollColumnIntoView. Please make it public so I can use it to scroll to a specific column.

1 comment
ADMIN
Didi
Posted on: 11 Jul 2025 12:09

Solution: You need to use a reflection to invoke the internal method.

 For the example, I call the method on a button click. 

private void Button_Clicked(object sender, EventArgs e)
	{
		var column = this.grid.Columns[3];

		MethodInfo getScrollToColumn = this.grid.GetType().GetMethod("ScrollColumnIntoView", BindingFlags.Instance | BindingFlags.NonPublic);

		getScrollToColumn.Invoke(this.grid, new object[] { column});
	}

Regards,
Didi
Progress Telerik