Hi,
I am trying to create gridview's columns dynamically and it works ok, I have my own object with all properties I want to set on columns. One of them is CellTemplateName so I can set column.CellTemplate = Resources[columnDefinition.CellTemplateName] as DataTemplate and it works ok.
The problem is when I want to read and save column definitions from gridview. Then I don't know how to get this CellTemplateName. I tried to get column.CellTemplate.DataTemplateKey but it is null.
Can you help what is the right way how to get the correct resource name of the cellTemplate?
Thank you,
Karel Bem
I am trying to create gridview's columns dynamically and it works ok, I have my own object with all properties I want to set on columns. One of them is CellTemplateName so I can set column.CellTemplate = Resources[columnDefinition.CellTemplateName] as DataTemplate and it works ok.
The problem is when I want to read and save column definitions from gridview. Then I don't know how to get this CellTemplateName. I tried to get column.CellTemplate.DataTemplateKey but it is null.
Can you help what is the right way how to get the correct resource name of the cellTemplate?
Thank you,
Karel Bem