Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
350
xamGrid set DataTemplate for autogenerated columns
posted

Hi,

is it possible to use AutoGenerateColumns="True" and additionaly set a DataTemplate for these autogenerated columns?

Stephan

Parents
No Data
Reply
  • 16495
    Offline posted

    Hello ,

     

    Thank you for your post.

     

    I have been looking into it. I have been investigating your requirement and if I understand correctly what you are trying to achieve, that I can suggest is to handle ColumnAutoGenerated event of XamGrid. You can read more details about it from the following link from our online documentation:

     

    http://help.infragistics.com/Help/Doc/WPF/2015.1/CLR4.0/html/xamGrid_Auto_Generate_Columns.html

     

    In the event handler you can get the Column by ColumnAutoGeneratedEventArgs and perform the needed operations to achieve what you want. I created short sample application based on your scenario to show you how you can implement this approach. Please let me know if I am missing something from your scenario. If the sample application  doesn’t cover your expectations feel free to modify it with the functionality that you are using, so I can investigate it further for you.

     

    If you require any further assistance, please do not hesitate to ask.

    DataTemplateForColumns.zip
Children