or
When binding the GridView to a LINQ result specifying entity names ("c" in the example below) without attributes the GridView displays their type name only and does not autogenerate colummns for their attributes:
Dim q = From c In qc Join s In qs On c.CustomerID Equals s.CustomerID |
Select New With {c, s.Size} |
DataGrid1.ItemsSource = q.ToList |
does not autocreate the grid columns for "c", it displays the type name. |
The grid displays:
WpsApp1.NorthwindService.Customers | small
WpsApp1.NorthwindService.Customers | big
How can I make the GridView autogenerate columns for entities in "Select New {}"?
<t_dock:RadPane> |
<t_dock:RadPane.Header> |
<StackPanel Orientation="Horizontal"> |
<Image Width="16" Source="Images/sample.png" /> |
<Label>Sample</Label> |
</StackPanel> |
</t_dock:RadPane.Header> |
This works well. However, the pane now displays "System.Windows.Controls.StackPanel" in the top area. How can I change this to display the label "Sample" instead?
Hi, im trying to bind a property to a templated datacolumn, but i dont get anything. The radgridview is binding to a simple dataset. <Window x:Class="LogViewer.MainWindow" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
Title="MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
Drop="Window_Drop" AllowDrop="True" |
xmlns:local="clr-namespace:LogViewer"> |
<Grid> |
<Grid.Resources> |
<Style x:Key="customCell" TargetType="telerik:GridViewCell"> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="telerik:GridViewCell"> |
<TextBlock Text="{Binding type1}" /> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
</Grid.Resources> |
<telerik:RadGridView Name="radGridView1" AutoGenerateColumns="True" telerik:StyleManager.Theme="Vista"> |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn Header="" TextAlignment="Center" |
CellStyle="{StaticResource customCell}" IsSortable="False" Width="76" /> |
</telerik:RadGridView.Columns> |
</telerik:RadGridView> |
</Grid> |
</Window> |