Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
675
Setting field(s) to fixed in code
posted

I programmatically build the fields, and I want the first field to be fixed to the near side. This doesn't work -- any thoughts?

field.FixedLocation =

FixedFieldLocation.FixedToNearEdge;

Parents
  • 9836
    Verified Answer
    posted

    Hi,

    You can try to enable fixing for all the fields using the AllowFixing property of the grid :

    xamDataGrid1.FieldSettings.AllowFixing = AllowFieldFixing.NearOrFar;

     

    and then set the FixedLocation property of the Field :

    and then set the FixedLocation property of the Field :

     

    Field customField = new Field();
    customField.Name =
    "Name"
    ;
    customField.FixedLocation = FixedFieldLocation.FixedToNearEdge;
    customField.Settings.AllowFixing = AllowFieldFixing.No;

    xamDataGrid1.FieldLayouts.Add(customField);

    Hope this helps

    Vlad

Reply Children
No Data