3

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.

Water Cooler v2
  • 32,724
  • 54
  • 166
  • 336
  • 1
    I think you need to set [ColumnResizeMode](http://documentation.devexpress.com/#AspNet/DevExpressWebASPxClassesColumnResizeModeEnumtopic) to `NextColumn`. – Zabavsky Jan 13 '14 at 18:22
  • Thank you. That worked. Please post it as an answer and I will mark it as the right one. – Water Cooler v2 Jan 13 '14 at 18:26

1 Answers1

3

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.

Zabavsky
  • 13,340
  • 8
  • 54
  • 79