SFDataGrid QueryRowStyle - bold column - All columns gets bold

Hi Syncfusion Team,


we use the QueryRowStyle function in SFDataGrid.

If we use this function (content doesn't matter - its enough to set e.Handled = true) and one column has the fontattribute = 'bold', all the GridTextColumns gets bold.


Is this known or can you reproduce it?


Regards

Andy


1 Reply

DV Diwakar Venkatesan Syncfusion Team July 13, 2023 01:08 PM UTC

Hi Andy, 

 

We have analyzed your query, and we assume that you want to set "FontAttributes.Bold" for a particular column. Instead of using QueryRowStyle, you can use QueryCellStyle. Please find the code snippet and user documentation below.

 

 

private void dataGrid_QueryCellStyle(object sender, QueryCellStyleEventArgs e)

{

    // Apply FontAttributes for specific column

    if (e.Column.MappingName == "OrderID")

    {

        e.Style.FontAttribute = FontAttributes.Bold;

        e.Handled = true;

    }

}

 

If the issue still persists, could you please share your requirements or code customization? This will help us to provide you with a better solution from our end.


Regards,

Diwakar V


Loader.
Up arrow icon