This is a migrated thread and some comments may be shown as answers.

[Solved] How can I programmatically change CellStyle?

1 Answer 151 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Happy
Top achievements
Rank 1
Happy asked on 14 Aug 2009, 09:35 PM
I have a custom control that wraps your grid that dynamically in the code behind creates the necessary columns. This works great so far but now I need hyperlink and image columns. I've looked at your online sample at http://demos.telerik.com/silverlight/#GridView/ColumnTypes/TemplateAndUnbound .

However, I can't figure out how to dynamically create a new GridViewDataColumn in C# so the columns are like in the sample referenced above.

1 Answer, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 17 Aug 2009, 05:36 AM
Hello,

I suggest you to inherit from GridViewDataColumn and override CreateCellElement where you can return desired FrameworkElement and override the default grid behavior.

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Happy
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or