I found this code in one of the Help files:
behavior.FixedColumns.Add(new FixedColumnInfo("selection", FixLocation.Left));
However, the word "behavior" is underlined in red and when I hover over it, C# says, "The name 'behavior' does not exist in the current context."Anyone know how to fix this? I'm trying to set it on Page_Load in the code-behind.
I found some additional code, so my current code block looks like this:
ColumnFixing behavior = this.DataGrid_Roster.Behaviors.GetBehavior(); if (behavior == null) { behavior = this.DataGrid_Roster.Behaviors.CreateBehavior(); } //Fixes the CustomerID column on the left behavior.FixedColumns.Add(new FixedColumnInfo("Mgr_Name", FixLocation.Left));
I get the following errors:The type or namespace 'ColumnFixing' could not be found The type or namespace 'FixedColumnInfo' could not be found The name 'FixLocation' does not exist in the current context.
Nevermind. As suspected, I missed the reference "Using Infragistics.Web.UI.GridControls;"
Hi John,
Thanks for posting in our forums. I believe that you already found a solution. Please, don't hesitate to ask for any additional information.
Thanks,
Dimitar Atanasov
Senior Software Engineer
Infragistics