Regards!
I'm trying adjust an columns of my GridView, but I don't know why it not change.
I Want adjust the first column with AutoResize Fill, and de remain cells with BestFit:
LoadGrid();
InitializeTemplate();
foreach (var Column in rgvHorasProveedores.MasterTemplate.Columns)
{
if (Column.Name != "Equipo") //Distinct to first column
{
if(Column.AllowResize == true)
Column.AllowResize = false;
}
}
//rgvHorasProveedores.Templates[0].BestFitColumns();
foreach (var Column in rgvHorasProveedores.Templates[0].Columns)
{
if (Column.Name != "Equipo")
{
Column.AllowResize = false;
}
}
rgvHorasProveedores.Templates[0].AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
rgvHorasProveedores.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
The level 2 (second template)it does not change and when reload thr grid, it lost the format.