Hello,
I use standard WPF DataGrid for building of dynamically columns in my 'dgFields'. I want to use telerik GridView.
If greatly simplify my code (for standard DataGrid) then I need similar for RadGridView:
I need Text, Hyperlink and CheckBox columns with binding.
Thanks,
Dmitry
I use standard WPF DataGrid for building of dynamically columns in my 'dgFields'. I want to use telerik GridView.
If greatly simplify my code (for standard DataGrid) then I need similar for RadGridView:
dgFields.Columns.Add(
new
DataGridTextColumn { Binding =
new
Binding(
"Name"
), Header =
"Column name"
, IsReadOnly =
true
});
dgFields.Columns.Add(
new
DataGridTextColumn { Binding =
new
Binding(
"Header"
), Header =
"Header"
, IsReadOnly =
true
});
dgFields.Columns.Add(
new
DataGridCheckBoxColumn { Binding =
new
Binding(
"IsVisible"
), Header =
"Is Visible"
, IsReadOnly =
false
});
dgFields.Columns.Add(
new
DataGridTextColumn { Binding =
new
Binding(
"Description"
), Header =
"Description"
, IsReadOnly =
true
, MinWidth = 258 });
foreach
(var column
in
myObject.HyperlinkColumns)
{
var style =
new
Style(
typeof
(TextBlock));
style.Setters.Add(
new
EventSetter(Hyperlink.ClickEvent, (RoutedEventHandler)EventSetter_OnHyperlinkClickEventHandler));
dgFields.Columns.Add(
new
DataGridHyperlinkColumn { Binding =
new
Binding(column.Name), Header = column.Header, ElementStyle = style });
}
I need Text, Hyperlink and CheckBox columns with binding.
Thanks,
Dmitry