Can not scroll data in the detail section of a Master Detail design on an sfDatagrid control

I have a SFData grid that has master Detail data. In my design the rows in the detail section will have more columns than are in the Master row. When I display the detail rows the data is cut off once the row length is the same length of the master row. This prevents me from seeing all of the data in the detail row. I can not scroll to the data that is hidden and I can not tab through the cells to get to the hidden cells. Is there a way to make the detail row either have horizontal scrolling or allow the detail row to be longer than the master row. Here is a screen shot of the grid:


In this example the detail row has 2 rows, but I can only see data to the "2021 Mar %" column. I should have additional columns that go out to "2021 Jun %." I can not get any columns beyond 2021 Mar to display. As you can see I can see a partial column in the detail rows for the column "2021 Apr Hrs". 

7 Replies 1 reply marked as answer

MA Mohanram Anbukkarasu Syncfusion Team January 25, 2021 09:00 AM UTC

Hi George, 

Thanks for the update.  

We have checked the reported scenario. It is not possible to have scrollbars separately for the child DataGrid. Horizontal scrollbar will be displayed only for the main DataGrid. However you can resolve this problem by setting AutoSizeColumnsMode as AutoSizeColumnsMode.Fill for both parent and child datagrids. We have prepared a sample to replicate this scenario and it is available in the following link for your reference.  


Please let us know if you require further assistance from us. 

Regards, 
Mohanram A. 



GB George Busby January 26, 2021 12:13 AM UTC

The approach you mentioned will not work. It ends up compressing the column widths to the point where you can not read the data in the columns. Here is a sample of how it looks. In the detail section you can not see the data or the headers in the first 4 columns.


What I would like it to do is display the full width of the master row and the full width of the detail row and the horizontal scroll would allow you to scroll the end of the longest row. I do not need a separate scroll for the Master area and the Detail area, I just need the horizontal scroll for the control to allow me to see the full length of the widest row.



DM Dhanasekar Mohanraj Syncfusion Team January 26, 2021 01:52 PM UTC

Hi George Busby,

Thank you for your response.

 
We are checked the reported scenario in our sample. we are unable to replicate the same please refer the below video for more information’s.

 
 
 
Please check the above sample and revert us if you still facing the same issue? If yes, please modify the sample based on your scenario and revert us back with the following details,

 
·       Issue reproducing video (If possible) 
·       Issue reproducing sample (If possible) 

It will be helpful for us to check on it and provide you the sample at the earliest. 

Regards,
Dhanasekar M. 



GB George Busby January 26, 2021 11:51 PM UTC

Here is the screen when I have the value AutoSizeColumnsMode.AllCells set. I have it set in 2 locations. I set the sfDataGrid control to have AutoSizeColumnsMode.AllCells. And when the relation is autogenerated I set the value for the new datagrid in the AutoGeneratingRelations method
 e.GridViewDefinition.DataGrid.AutoSizeColumnsMode = AutoSizeColumnsMode.AllCells





Here is what the screen looks like when I change the AutoSizeColumnsMode to .Fill in the same two places. I made no other code changes.


The user now can not read the values in the first 4 columns. All this approach does is compress the columns to make them fit in the width that is available. While that does fix the problem where I could not see all of the columns, it creates another problem where the values are cut off. I know have to expand each cell to see what the value is. This will not work. What I need is to have the detail record width be longer than the master record so all of the columns can show in a normal width so the value can be read.
In my application the width of the Master row and the detail row will be variable based on the number of months that are being displayed. So I can not just make the control wider to make the .Fill approach work. If nothing else, I have to find a way to make the system make the Master row wider so there will be enough space to display the columns in the detail record. The better approach however, would be to allow the detail row display wider than the Master row and set the horizontal scroll so it will scroll to the widest row in the grid.




MA Mohanram Anbukkarasu Syncfusion Team January 27, 2021 11:57 AM UTC

Hi George, 

From the provided details, it is clear that you are using auto generating the relations to generate Master-Details view and set AutoSizeColumnsMode as Fill. We have prepared a sample by auto generating details view with AutoSizeColumnsMode as AllCells. But we are able to see the horizontal scrollbar at the bottom of the SfDataGrid. Please find the sample we have used to check this in our end.  



Please have a look at this sample and let us know if you we have missed any customizations you have done in your application or try to reproduce the reported issue in this sample. It will be more helpful for us to find the exact cause for the issue and to provide a prompt solution at earlier.  

Regards, 
Mohanram A. 



GB George Busby January 28, 2021 01:31 AM UTC

Yes I know in the last example I used .Fill that is what I was told would fix my issue. In my previous message I noted that I originally had the cells set to AllCells and I included an image of both scenarios. And yes, I am autogenerating the relation. Yes the scroll bar will appear if the master row is longer than the control but the scroll bar will not appear if the master row is less than the width of the control but the detail row is wider then the control. The best way for you to see what is happening is to create a master detail case where there is only 1 property in the master row and have 10 or more properties in the detail row. Due to the way the sfdatagrid works the detail row will only display columns until it is the same length as the master row. The problem with that is that there is no way to see the values for all of the detail row properties. 
What I am suggesting is that the sfDataGrid should display the full width of each row no matter if it is a master row or a detail row. The scroll region should then incorporate the widest row so a user can scroll the full length of any of the rows.




MA Mohanram Anbukkarasu Syncfusion Team January 28, 2021 06:25 AM UTC

  
Hi George, 

We regret for the inconvenience.  

We have prepared a sample with only one column in the parent grid and seven columns in the child grid using auto generation and set AutoSizeColumnsMode as AllCells. But the horizontal scrollbar is displayed as shown below.  

 

The sample we have used to check this scenario is available in the following link for your reference.  


If still the problem exists, please try to reproduce the reported issue in this sample as we requested in our previous update. It will be more helpful for us to find the exact cause for the issue and to provide a prompt solution at earlier.   

Regards,  
Mohanram A. 



Marked as answer
Loader.
Up arrow icon