Hi I have a control which includes 3 grid controls, they are gridControl1, gridControl2 and gridControl3 and the views are gridView1, gridView2 and gridView3.
I have 3 buttons, when click Button1, gridControl1 and gridView1 display; click Button2, gridControl2 and gridView2 display; click Button3, gridControl3 and gridView3 display.
I hope there could be a horizontal scrollbar displays as well with each grid control/grid view. And hence I have below code for each gridview:
gridView1.OptionsView.columnAutoWidth = false;
gridView1.ScrollStyle = ScrollStyleFlags.LiveHorzScroll;
gridView1.HorzScrollVisibility = ScrollVisibility.Always; // or ScrollVisibility.Auto doesn't work neither; or remove this line, doesn't work neither
Then I have:
this.Controls.Add(this.gridControl1);
this.Controls.Add(this.gridControl2);
this.Controls.Add(this.gridControl3);
this.AutoScroll = true;
With gridView1.HorzScrollVisibility = ScrollVisibility.Always I can see the scrollbar but it is not enabled and my columns are still auto adjust the width so the total width doesn’t exceed the grid width. With this gridView1.HorzScrollVisibility sets as other values, the horizontal scrollbar is not visible at all.
Do I need to set column min width to make this scrollbar works? Or anything I may miss and hence it doesn’t work properly?
Thanks!
I think what you need to do is to set this to false :