Displaced grid header columns

Hi,

I have grids like the below code. I tried a lot of things with column width and autoFit but there is always a displacement of column header texts in relation to their column contents. See my attached screenshot. You can see that "Beschreibung" header text is too right. How do I make it fit?

Regards,
Steffen



<GridComponent dataSource={data} 
                allowSorting={true} sortSettings={columns: [{ field: 'name'direction: 'Ascending' }] }}
                allowPaging={true} pageSettings={pageSize: 8 }}
                allowFiltering={true} filterSettings={type: 'Menu' }}
                allowSelection={false} allowTextWrap={true}>
                <ColumnsDirective>
                    <ColumnDirective field='preset' width='50px' headerText=''
                        template={(xyz: XYZ=> xyz.preset
                            ? <span className='e-icons e-lock-icon'></span> 
                            : null} />
                    <ColumnDirective field='name' width='200px' headerText='Name' />
                    <ColumnDirective field='description' width='400px' headerText='Description' />
                    <ColumnDirective template={templateWith2Buttons} width='350px' headerText='Actions' />
                </ColumnsDirective>
                <Inject services={[PageSortFilterResize]} />
            </GridComponent>

Attachment: sc1_326204ac.zip

3 Replies 1 reply marked as answer

VS Vignesh Sivagnanam Syncfusion Team September 29, 2020 02:04 PM UTC

Hi Steffen, 

Thanks for contacting Syncfusion support. 

Based on your query we have prepared a sample but we did not reproduce the reported issue at our end. Please refer the below sample for your reference. 


Please share us the following information to validate further on this, 

  1. Share the Complete Grid rendering Code.
 
  1. If possible, please share a simple issue reproducing sample or replicate the problem with our above attached samples

  1. Share the Syncfusion packages version.

Regards, 
Vignesh Sivagnanam 



Marked as answer

SH Steffen Harbich September 30, 2020 07:37 AM UTC

Alright, found the problem: A style applied from my general CSS like

table {
        widthauto;
        displayinline-block;
    }

was causing the bad positioning. After removing it, everything works fine. Thanks for example, though.



RS Rajapandiyan Settu Syncfusion Team October 1, 2020 11:49 AM UTC

Hi Steffen, 
 
We are glad that you have resolved the reported problem. 
 
Please get back to us if you need further assistance with this. 

Regards, 
Rajapandiyan S 


Loader.
Up arrow icon