Can't get grid to appear seamlessly within a container

Hi there, within a container I can't find a way to get a grid to fill the available space within showing a separator that messes up the way it looks. Is there a way to make this look better? I'd like the SfGrid to fill the container and look seamless, even if the columns do not take the entire width. I've tried a number of options and would like to know if there are any useful tips. I've tried to contain the SfGrid using Flexbox and CSS grid and used various options (everything I can think of). Any tips?

Image_3477_1705099332528


2 Replies

JP John Phillips January 12, 2024 10:58 PM UTC

By the way, I already tried to set the GridLines property to horizontal and none in the SfGrid declaration. Had no effect.

Snippet
GridLines="GridLine.Horizontal"
Snippet
GridLines="GridLine.None"


SP Sarveswaran Palani Syncfusion Team January 16, 2024 04:30 AM UTC

Hi John,

Greetings from Syncfusion support.

From your query, we suspect that you want to fit all the columns within the grid container, and you didn’t want empty space within the container. We would like to inform you that, when you set Width property to the column, it’ll adjust the column width automatically based on the browser layout. If you use autofit to any one of the columns, it’ll adjust the column width based on the maximum content width. This is the issue you’re facing at your end.


Reference: https://blazor.syncfusion.com/documentation/datagrid/columns#column-width

               https://blazor.syncfusion.com/documentation/datagrid/columns#autofit-columns

Kindly share the following details to us:


  1. Are you using any AutoFit property in your project?
  2. In which format, are you define your Width property like px, %?
  3. Share the Grid code snippet to us.
  4. If possible, share the issue reproducible sample to us.


The above details will be more helpful to further validate your query and provide precise solution ASAP from our end.

Regards,
Sarvesh


Loader.
Up arrow icon