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
280
Changes with RecordsInViewChanged between v13.1 and 14.2
posted

Hi,

 I am using a xamDataGrid where in each row I display text on multiple lines which needs follow these conditions.

  • If the text can be displayed on 5 lines or less -> we display the full text, adjusting the height based on the number of lines displayed
  • If the text is longer than 5 lines -> we only display the 2 first lines and we add a button to display the full text in a separate dialog.

The way is currently working is that we adjust the MaxHeight for each record whether the control's size or the records in view changed.


Everything worked fine until we upgraded from Infragistics V13.1 to InfragisticsV14.2.

After the upgrade, we started to see a big blank space in our control where we should see records the first time the control is displayed. If we start scrolling down, the missing records magically appear and everything looks fine afterwards.


Do you know if any changes were made around RecordsInViewChanged that would impact what we are doing? Is there a way to force a refresh for the records that should be in view after adjusting the record's heights?


Thanks,

Parents
  • 280
    posted

    Related to my first post, I set the CellMaxHeight and CellHeight of the FieldSettings the same height when initializing my grid.

    fieldLayout.Fields["text"].Settings.CellMaxHeight = MaximumDisplayLines * DefaultCellHeight;

    fieldLayout.Fields["text"].Settings.CellHeight = MaximumDisplayLines * DefaultCellHeight;


    When RecordInViewChanged is triggered, I loop through the Records in View to adjust the height.
    I am actually adjusting the maxheight of the recordPresenter and not the height of my field which might be the problem.
    foreach (DataRecord dataRecord in _ReportViewGrid.GetRecordsInView(false))
    {
        RecordPresenter recordPresenter = RecordPresenter.FromRecord(dataRecord);
       ...
       recordPresenter.MaxHeight = maxHeight);
       ...
    }


    I did try to change the height of the field doing the following, but it doesn't change anything
    CellValuePresenter.FromCell(dataRecord.Cells[textFieldName]).Height = maxHeight;

    Please let me know what else I could try.


    Thanks,

Reply Children