I need to programmatically pin the first four colums...I'd also like to do this without showing the pins, i dont want the user to pin/unpin, i just want the first four columns not to go away when i scroll to the right...this should be simple and i cant find it anywhere.
UltraWinGrid
thanks,
private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e) { e.Layout.UseFixedHeaders = true; e.Layout.Override.FixedHeaderIndicator = FixedHeaderIndicator.None; for (int i = 0; i < 4; i++) { e.Layout.Bands[0].Columns[i].Header.Fixed = true; } }
is there any reason why the InitializeLayout event never fires? The only layout i've been able to modify has been the DisplayLayout property
I was able get this working by modifying these values in my constructor
grid.DisplayLayout.UseFixedHeaders = true;
grid.DisplayLayout.Override.FixedHeaderIndicator = FixedHeaderIndicator.None
for (int i = 0; i < 4; i++){ grid.DisplayLayout.Bands[0].Columns[i].Header.Fixed = true;}
But I still don't understand why InitializeLayout event never fires
i had this code and a breakpoint and it never triggered
this line does execute:view.Grid.grid.InitializeLayout += new InitializeLayoutEventHandler(grid_InitializeLayout);
but this method in the same class never gets called:
void grid_InitializeLayout(object sender, InitializeLayoutEventArgs e)
{
e.Layout.UseFixedHeaders = true;
e.Layout.Override.FixedHeaderIndicator = FixedHeaderIndicator.None;
for (int i = 0; i < 4; i++)
e.Layout.Bands[0].Columns[i].Header.Fixed = true;
}
What exactly is "not working"?
The property works. So if something is not working, my best guess is that you are not setting it on the correct object, or maybe something in your code is setting it again and changing it after you set it.
I have set this property to false but it's not working I'm using UltraWinGrid v.11.2
Hi,
Sure, just set AllowRowSummaries to false. This property only determines whether the user can edit the summaries via the Sigma button in the column header. It does not have any effect on your ability to add summaries to the grid in code.
Hi Mike, I want to allow summary in some columns but I want to hidde sigma symbol in header, is that possible?
yes, i'm setting the datasource and then wiring the event, thank you.