DevExtreme v23.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.
Data Grid

Cell Customization

DataGrid allows you to modify cell style settings and custom paint cells in a PDF document.

Use the customizeCell function to customize the appearance settings of DataGrid cells in a PDF document. For example, you can change the text alignment and the background color of cells. The following function parameters are available:

  • gridCell
    Contains information about the source DataGrid cell.
  • pdfCell
    Contains settings applied to a cell in a PDF document.

In this demo, the customizeCell function changes the following elements:

  • Background color and font weight of group row cells
  • Font style of a footer cell

The customDrawCell function allows you to draw cells in a PDF document. The following parameters are available when you use this function:

  • doc
    An instance of the jsPDFDocument object.
  • rect
    A cell’s bounds.
  • gridCell
    Contains information about the source DataGrid cell.
  • pdfCell
    Contains settings applied to a cell in a PDF document.
  • cancel
    Set this parameter to true to prevent default painting logic.

This demo uses the customDrawCell function to paint cells in the "Website" column.

Thank you for your interest in our ASP.NET MVC product libraries and UI component suite. We are moving ASP.NET MVC-related demos and content to DevExpress.com. Please make sure to update your bookmarks with our new URL.

View Demo