I have a RadGridView that is part of a datatemplate that I am creating at runtime via c#. All is good if I AutoGenerate the columns. If I try to create the GridViewDataColumns I have no way of adding them. Seems the Columns property is not exposed as a dependency property. Can you please look into this and suggest a work around or possible solution? In my example, RadGridView.Columns does not appear to be accessible.
FrameworkElementFactory radGridView =
new
FrameworkElementFactory(
typeof
(RadGridView));
radGridView.SetValue(RadGridView.ShowGroupPanelProperty,
false
);
radGridView.SetValue(RadGridView.ShowInsertRowProperty,
false
);
Telerik.Windows.Controls.GridViewColumnCollection colCollection =
new
Telerik.Windows.Controls.GridViewColumnCollection();
GridViewDataColumn dc =
new
GridViewDataColumn();
dc.Header =
"test"
colCollection.Add(dc);
radGridView.SetValue(RadGridView.Columns,colCollection);