문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top