This is a migrated thread and some comments may be shown as answers.

Full documentation

7 Answers 161 Views
GridView
This is a migrated thread and some comments may be shown as answers.
G
Top achievements
Rank 1
G asked on 27 Oct 2008, 02:37 AM
The online documentation for the gridview doesn't seem comprehensive.
Is there any documentation that cover all the details?

Thanks

7 Answers, 1 is accepted

Sort by
0
Atanas
Telerik team
answered on 27 Oct 2008, 11:04 AM
Hello G,

We are working on constantly improving the documentation and we will appreciate it if you give us your feedback on the specific areas where you would expect more details.

Regards,
Atanas
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
L uke
Top achievements
Rank 1
answered on 06 Jul 2009, 02:26 PM
I have the same problem. I spend on the examples many hours, but it is hard to understand what is going on. I`ve used DataGrid by wpftoolkit and everything was obvious, but here for 2 days I have constant errors.

I want to create RadGridView with one HierarchyChildTemplate. I have temporary created class what retrieves summatry data from database, ex:
class User { int Id{get;set;}}

class Item
{
User User{get;set;}
int Sum{get;set;}
}

class SubItem
{
User User{get;set;}
int DetailedValue{get;set;}
DateTime Date{get;set;}
}

How to assign objects of Items to objects of SubItem. I do something like this:

dataGrid.ItemsSource = items.AsEnumerable();

TableRelation relation = new TableRelation();
relation.FieldNames.Add(new FieldDescriptorNamePair("User.Id", "User.Id"));

GridViewTableDefinition definition = new GridViewTableDefinition();
definition.AutoGenerateFieldDescriptors = false;

definition.DataSource = subitems.AsEnumerable();
definition.Relation = relation;

dataGrid.TableDefinition.ChildTableDefinitions.Add(definition);


And when I click on the +, I get "Value cannot be null".
0
Vlad
Telerik team
answered on 06 Jul 2009, 02:37 PM
Hi,

You can use PropertyRelation similar to this example:
http://demos.telerik.com/wpf/?GridView/WPF/Hierarchy/PropertyHierarchy

Regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
L uke
Top achievements
Rank 1
answered on 07 Jul 2009, 08:08 AM
Thanks for that, now I have another problem:
I do:
GridViewTableDefinition detailDefinition = new GridViewTableDefinition();
detailDefinition.Relation = new PropertyRelation("Data");
dataGrid.TableDefinition.ChildTableDefinitions.Add(detailDefinition);
dataGrid.ItemsSource = data.AsEnumerable();

and

<telerik:GridViewDataControl.HierarchyChildTemplate>
                <DataTemplate>
                    <StackPanel Background="#FF525252">
                        <Border BorderBrush="#FFFDDFAA" BorderThickness="2">
                            <telerik:RadChart x:Name="radChartSales" HorizontalAlignment="Stretch" Loaded="radChartSales_Loaded"
                                              MinWidth="200" Height="200" />
                        </Border>
                    </StackPanel>
                </DataTemplate>
            </telerik:GridViewDataControl.HierarchyChildTemplate>

I want put data into chart. since here it works, but

private void radChartSales_Loaded(object sender, RoutedEventArgs e)
        {
            var chart = sender as RadChart;
            var radSource = chart.DataContext as RecordManager;
           
            radSource.EnumerableData // contains what I need but it`s private. instead of that I have some Record objects? and no acces to data. I want to operate separately on each stored item and put it into chart series
        }





0
Vlad
Telerik team
answered on 07 Jul 2009, 08:10 AM
Hi L G,

In Q2 2009 (just released) DataContext is directly your parent data object. You can cast directly to your object type and get desired property.

Regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
L uke
Top achievements
Rank 1
answered on 07 Jul 2009, 10:23 AM
I`ve uninstalled old version and installed Q2 2009, and still in chart.DataContext I have RecordManage object.
Is there any other way of retrieving data associated to the record?
0
L uke
Top achievements
Rank 1
answered on 07 Jul 2009, 10:43 AM
I manually deleted files from bin, and rebuild project. Something has changed but now there is an error that
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
does not exist
I`ve tried to change it to
xmlns:telerik="http://schemas.telerik.com/2009/xaml/presentation"
but with no result

When I try to add control using Toolbox I get: "The operation could not be completed. Nieprawidlowa struktura FORMATETC" in all projects.






---------------------------
I`ve found the error. I need to readd assemblies to project. Still thanks. Now it works.


Tags
GridView
Asked by
G
Top achievements
Rank 1
Answers by
Atanas
Telerik team
L uke
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or