QueryRowHeight is not called, when DetailsViewDefinitions is added

Hi,

I have modified the DetailsView demo to illustrate.

        public Form1()
        {
            InitializeComponent();
            SampleCustomization();
            this.sfDataGrid1.QueryRowHeight += Grid_QueryRowHeight;
        }

        private void Grid_QueryRowHeight(object sender, QueryRowHeightEventArgs e)
        {
            if (e.RowIndex > 0)
            {
                e.Height = 55;
                e.Handled = true;
            }
        }

If the last line of SampleCustomization is commented out, QueryRowHeight is called
        private void SampleCustomization()
        {            
            ...
            //this.sfDataGrid1.DetailsViewDefinitions.Add(orderDetailsView);
        }


With last line present, the QueryRowHeight is not called and row height is not changed
        private void SampleCustomization()
        {            
            ...
            this.sfDataGrid1.DetailsViewDefinitions.Add(orderDetailsView);
        }


Event QueryRowHeight is also not fired, when invalidating the current row height in QueryRowStyle event.
        private void Grid_QueryRowStyle(object sender, QueryRowStyleEventArgs e)
        {
            this.sfDataGrid1.InvalidateRowHeight(e.RowIndex);
        }


Edit to add: 
Setting row height seems to be possible directly in QueryRowStyle:
        private void Grid_QueryRowStyle(object sender, QueryRowStyleEventArgs e)
        {
            this.sfDataGrid1.TableControl.RowHeights[e.RowIndex] = 55;
        }

2 Replies

AA Arulraj A Syncfusion Team September 3, 2018 09:33 AM UTC

Hi Tipal, 

Thanks for contacting Syncfusion support. 

Currently Master-Details view in SfDataGrid does not support AutoRowHeight and QueryRowHeight event will never called if the SfDataGrid contains DetailsViewDefinitions. Please refer to the below UG link for the limitations of the Master Details view. 

 
We have logged this as a feature request in our database. This feature will be implemented in any of our upcoming releases. We will let you know once the feature is implemented.  
 
Arulraj A 



MA Mohanram Anbukkarasu Syncfusion Team September 3, 2018 01:27 PM UTC

Hi Tipal, 

Thanks for contacting Syncfusion support. 

Currently Master-Details view in SfDataGrid does not support AutoRowHeight and QueryRowHeight event will never called if the SfDataGrid contains DetailsViewDefinitions. Please refer to the below UG link for the limitations of the Master Details view. 

 
We have logged this as a feature request in our database. This feature will be implemented in any of our upcoming releases. We will let you know once the feature is implemented.                                 
 
Regards, 
Mohanram A. 


Loader.
Up arrow icon