Pergunta

I want to allow the user to resize the GridView extension's columns' but the total width of the grid should be fixed.

I am currently using these settings.

settings.Width = 1200;
settings.SettingsBehavior.ColumnResizeMode = ColumnResizeMode.Control;
settings.Settings.HorizontalScrollBarMode = ScrollBarMode.Auto;

Though they cause the columns to resize, they also resize the width of the grid when I resize the columns.

Some important things:

a) I am using ASP.NET MVC 4 and DevExpress v12.2.10.0

2) My grid has just 2 columns.

Foi útil?

Solução

You have to use ColumnResizeMode.NextColumn in the settings of the GridView.

From the documentation:

Changing a column's width changes the next column's width.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top