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
1865
Fix only top row
posted

My xamDataGrid is sorted by Field1. Field1 has a value "~Total" so this row always appears as the first row. Is there a way to keep this row fixed as the 1st row even if the user re-sorts the data? The AllowRecordFixing feature will work if I could fix this top row programmatically but do not allow the user to fix other rows?

Thanks.

 

Parents
  • 890
    Verified Answer
    posted

    Hi

    If you are going to fix records only in code then you do not need to allow record fixing. You can just do this:

     

    private void XamDataGrid_Loaded(object sender, RoutedEventArgs e)

    {

                XDG.Records[0].IsFixed = true;

                //If you do not wish to see the Record Separator           

                XDG.FieldLayoutSettings.RecordSeparatorLocation = RecordSeparatorLocation.None;

    }

    Please let me know if that is what you were looking for or if you have any other questions.

     

    Thanks,

    Slavi

    XdgRecordFixing.zip
Reply Children
No Data