2
I have a function that creates a grid, But I don’t know how to get that value, the function is down here:
using System.Windows.Controls;
public override FrameworkElement criar()
{
if (formulario == null)
return null;
DataGrid grid = new DataGrid();
ContextMenu menu = new ContextMenu();
definirStyle(grid, "tema.estiloGradeDados");
definirBinding(grid, DataGrid.ItemsSourceProperty, "dados", true);
grid.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
grid.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
grid.GroupStyle.Add(new GroupStyle() {ContainerStyleSelector = new SeletorEstiloItemGrupo() });
grid.ContextMenu = menu;
grid.Height = 800;
foreach (DskCampo campo in dskFormulario.campos)
{
criarItemMenu(menu, campo);
criarColuna (grid, campo);
}
return grid;
}
Does the Datagrid scroll descend from "Scrollviewer"? How do I manipulate it?
The
DataGrid
has an eventScroll
, he doesn’t help? system.windows.Forms.datagrid.scroll– Ricardo Pontual
No, this library uses Forms, and I am using the "System.Windows.Controls" Datagrid https://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid(v=vs.110). aspx
– Vitória Moraes