Margin

Hi,

how can I override the default margin of the datagrid? I cannot get rid of it. 

Thanks in advance 

Michel

3 Replies 1 reply marked as answer

JP Jeevakanth Palaniappan Syncfusion Team October 21, 2020 03:29 PM UTC

Hi Michel, 

Greetings from Syncfusion  support. 

You can override our default styles and customize the grid by overriding our default grid classes styles. Please refer the below documentation for your reference. 

Please get back to us if you have any queries. 

Regards, 
Jeevakanth SP. 


Marked as answer

MJ Michel Jost October 23, 2020 06:55 AM UTC

Thanks for your reply.

But I was not able to change the margin of the datagrid. I tried to override the CSS class 'e-grid' and several more.

Can you please provide a code snippet which shows how to set the margin to 0?

Thanks in advance


JP Jeevakanth Palaniappan Syncfusion Team October 27, 2020 07:59 AM UTC

Hi Michel, 

By default, the grid element has no margin. For your reference we have attached the screenshot below for the same. 

 

If you want to set the margin then you can set by using the below code snippet. 

<style> 
    .e-grid { 
        margin: 10px;     
    } 
</style> 

We have attached the screenshot which shows the margin sets as 10px. Also attached sample for your reference. 

 


If you are still facing any issues then kindly share us the issue reproducing sample or reproduce the issue in the provided sample. 

Regards, 
Jeevakanth SP. 


Loader.
Up arrow icon