We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Customise rendering when AutoGenerateColumns is True

Thread ID:





120514 Sep 22,2015 11:18 AM UTC Sep 23,2015 02:25 PM UTC WPF 2
Tags: SfDataGrid
Asked On September 22, 2015 11:18 AM UTC

This is all for the scenario where the sfDataGrid is bound to a list of entities of the same type.

1) We have some columns that use the data type DateTimeOffset - columns are not displayed for these (but I can see that the event AutoGeneratingColumn *is* fired for the column) presumably because no Renderer has been defined for that data type.

Is it possible to somehow customise the renderer that will be used for that column? eg provide our own renderer like the examples http://help.syncfusion.com/wpf/sfdatagrid/columns#how-to-override-existing-cell-types - but this example is for changing the renderer for an existing data type.  I would instead like to be able to specify a custom renderer for specific columns.

2) Similarly, if we have an entity that has a reference to another entity (or perhaps collection of entities) is it possible (again using AutoGenerateColumns="True") to specify a custom renderer for that column?

eg if the main entity in the grid is:
public class MyEntity() {
   public int ID {get; set;}
   public MyOtherEntity Related {get; set;}
public class MyOtherEntity {
  public string Description {get; set;}
For instance when displaying a list of MyEntity in the grid, I would like my custom renderer - or any other mechanism - to look up the Description property on the related entity.

Again I can see that the AutoGeneratingColumn event is fired for that column so is it possible to hook into this to customise what's shown for the column?

The reason for needing AutoGenerateColumns="True" is that this needs to be a fairly generic solution.

Replied On September 22, 2015 02:12 PM UTC

To add to this - if it's possible in XAML using DataTemplates (but again using AutoGenerateColumns="True" and not specifying the columns in the XAML) then that would also be fine.

Jai Ganesh S [Syncfusion]
Replied On September 23, 2015 02:25 PM UTC

Hi Stephen,

Thank you for using Syncfusion products.

We analyzed your query. A support incident to track the status of this query has been created under your account. Please log on to our support website to check for further updates


Please let me know if you have any questions.


Jai Ganesh S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon