This question is locked. New answers and comments are not allowed.
I am trying to create columns dynamically in code for a RadGridView. So something like this:
I would like to also wire in code so that when the link is clicked it fires an event handler in code. Since it is being added this way I cannot easily set any kind of template or style that binds to any kind of command. I tried using AddHandler at various parts of GridView but cannot seem to it in the right spot. I am suprised the GridViewHyperlinkColumn object does not have an Event of any kind. Any way to make this work?
Thanks for any help.
Ernie
01.AssociatedObject.Columns.Clear();02.var col = new GridViewHyperlinkColumn03.{04. DataMemberBinding = new Binding(hcol.ColumnName),05. IsReadOnly = hcol.IsReadOnly,06. Header = hcol.Header,07. Width = hcol.Width,08. DataFormatString = hcol.DataFormatString09.};10. 11.//AssociatedObject is a RadGridView12.var columns = AssociatedObject.Columns;13.columns.Add(col);I would like to also wire in code so that when the link is clicked it fires an event handler in code. Since it is being added this way I cannot easily set any kind of template or style that binds to any kind of command. I tried using AddHandler at various parts of GridView but cannot seem to it in the right spot. I am suprised the GridViewHyperlinkColumn object does not have an Event of any kind. Any way to make this work?
Thanks for any help.
Ernie