<Window x:Class="RadGridViewTest.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:radGridViewTest="clr-namespace:RadGridViewTest" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <radGridViewTest:ContextData x:Key="ContextData"/> </Window.Resources> <Grid DataContext="{StaticResource ContextData}"> <telerik:RadGridView ItemsSource="{Binding Path=ExampleTable}" AutoGenerateColumns="True" ShowGroupPanel="False"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding ExampleColumn}" Header="Via property"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Example}" Header="Via Column Name"/> </telerik:RadGridView.Columns> </telerik:RadGridView> </Grid></Window>using System.Data;using System.Windows;namespace RadGridViewTest{ /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } } public class ContextData { public ContextData() { ExampleTable = new StrongNamedDataTable(); var row = ExampleTable.NewRow(); row[ExampleTable.ExampleColumn] = "Test Data"; ExampleTable.Rows.Add(row); } public StrongNamedDataTable ExampleTable { get; set; } } public class StrongNamedDataTable : DataTable { public StrongNamedDataTable() { ExampleColumn = this.Columns.Add("Example"); } public DataColumn ExampleColumn { get; private set; } }}We have a requirement of building an editable grid that looks something like below. Can you tell us if this is possible with minimal work using any of your controls.. including pivot control if possible. We are looking at purchasing around 8-10 developer licenses. Remember the control must support 2-way binding such that if a user changes any data in the grid, then it must correctly update the field of the correct element in the object collection:
|
Date |
1/1/2012 |
1/2/2012 |
1/3/2012 |
1/4/2012 |
|
Customer |
Cust 1 |
Cust 2 |
Cust 3 |
Cust 4 |
|
Bill Amount |
100 |
200 |
120 |
50 |
As you can see it is basically a transposed list and the data format is per row/cell and not per column. Will really appreciate if someone can point me to the control that would fit this need with some directions/links etc. Also the no. of columns will be dynamic, so the grid needs to generate the appropriate no. of columns at runtime.
Imports Telerik.Windows.ControlsImports Telerik.Windows.PersistenceFrameworkImports Telerik.Windows.Persistence.Storage<telerik:RadGridView Name="gvComp" telerik:StyleManager.Theme="Office_Black" AutoGenerateColumns="False" FrozenColumnCount="3" telerik:PersistenceManager.StorageId="gvComp_Layout" EditTriggers="CellClick,TextInput,CurrentCellClick" ShowColumnFooters="True" ShowGroupFooters="True" VerticalAlignment="Stretch">Dim isoProvider As New IsolatedStorageProvider()isoProvider.SaveToStorage()Dim isoProvider As New IsolatedStorageProvider()isoProvider.LoadFromStorage()