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

[Solved] q3 beta 2 and HierarchyChildTemplate

8 Answers 129 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
david ocasio
Top achievements
Rank 1
david ocasio asked on 04 Nov 2009, 03:48 PM
I am trialing q3 beta 2

i would like to use the hierarchal grid feaure with beta 2

i tried previously but the preformance was lacking
since you guys have increased the speed i thought i would try again

if i do not use a template it works fine
as soon as i use the template the child grid columns and rows fail to show up .
i assume either i am missiing something like passing the binding to the template
or the api has changed and i should do it differently

                                <telerikGridView:RadGridView Grid.Row="3" x:Name="KitPullWorksheet" AutoGenerateColumns="True" > 
                                    <telerikGridView:RadGridView.HierarchyChildTemplate> 
                                        <DataTemplate> 
                                            <telerikGridView:RadGridView AutoGenerateColumns="True">  
                                            </telerikGridView:RadGridView> 
                                        </DataTemplate> 
                                    </telerikGridView:RadGridView.HierarchyChildTemplate> 
                                </telerikGridView:RadGridView> 
 

i am setting the definition in code

        Dim detailDefinition As New GridViewTableDefinition()  
        detailDefinition.Relation = New PropertyRelation("PullListBins")  
        KitPullWorksheet.TableDefinition.ChildTableDefinitions.Add(detailDefinition)  
 
        KitPullWorksheet.ItemsSource = Context.PullListParts  
 

any help would be appreciated

thanks
dco

8 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 04 Nov 2009, 03:55 PM
Hi,

We just released our Q3 officially! Please try it and let us know if you still have any problems.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
david ocasio
Top achievements
Rank 1
answered on 04 Nov 2009, 05:10 PM
just downloaded q3 trial
2009.3.1103.1030

replaced binaries
rebuilt project

but still have the same problem

i suspect it is just a conceptual or syntax problem on my part
but when i add the template as shown in prior post the child data just does not show

i'll keep trying of course

as always
any help would be appreciated

thanks
dco
0
david ocasio
Top achievements
Rank 1
answered on 04 Nov 2009, 06:37 PM

Ive found my problem
too easy

i did not specify in the template the binding for the child grid

added

ItemsSource="{Binding PullListBins}" 

and it worked

sorry i posted so quickly guys

thanks
dco
0
Krishna Kishor Bhat
Top achievements
Rank 1
answered on 09 Nov 2009, 10:59 AM
Hi,

I had implemented the HierarchyChildTemplate in the Q2 release, and after the Q3 release upgraded the code reference to the latest dlls. On doing so I found that the Hierarchical child gridviews were not populating.

I m assigning the data source of a GridViewTableDefinition object with the e.result of the webservice, which gets me data for the child grids. also before binding the data I m setting the table relation between the parent and child grids.

if (e.Result.Count > 0) 
                { 
                    TableRelation relation = new TableRelation(); 
                    relation.FieldNames.Add(new FieldDescriptorNamePair("CategoryId""CategoryId")); 
 
                    GridViewTableDefinition subCategoryTableDefination = new GridViewTableDefinition(); 
                    subCategoryTableDefination.Relation = relation;  
 
                    olstSubCategory = e.Result; // olstSubCategory is an observable list object
                    subCategoryTableDefination.DataSource = olstSubCategory; 
 
                    grdSelectCategory.ChildTableDefinitions.Add(subCategoryTableDefination); 
                } 

I want the solution asap, as application release is this weekend.

Thanks,
Krishna
0
Vlad
Telerik team
answered on 12 Nov 2009, 06:51 AM
Hello Krishna,

You can check this application for more info.

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Juan Esteban Giraldo Gómez
Top achievements
Rank 1
answered on 25 Nov 2009, 07:23 AM
Hi, How are you?

I have a Hierarchical grid with components and requirements. I have used TableRelation and FieldDescriptorNamePair to connect the parent grid whit his child.
The following code, call a Domain Service operation and load the requirement collection:

 

 

            App.Current.Servicio.Load(App.Current.Servicio.GetRequisitosPorEvaluacionQuery(EvaluacionActual.IdEvaluacion),  
                CargaRequisitosCallback, null); 

I have a callback method to be called when the load operation complete.
In this method, I setup the GridViewDataControl and set control DataSource.

 

private void CargaRequisitosCallback(LoadOperation<RequisitoEvaluacion> operacionCarga)

 

{

 

if (operacionCarga.Error != null)

 

{

 

throw operacionCarga.Error;

 

}

 

 

TableRelation relacion = new TableRelation();

 

relacion.FieldNames.Add(

new FieldDescriptorNamePair("IdComponente", "IdComponente"));

 

 

GridViewTableDefinition definicionTablaHija = new GridViewTableDefinition();

 

definicionTablaHija.AutoGenerateFieldDescriptors =

false;

 

 

GridViewDataColumn columnaRequisito = new GridViewDataColumn();

 

columnaRequisito.DataMemberBinding =

new Binding("Descripcion");

 

columnaRequisito.Header =

"Requisito";

 

columnaRequisito.IsFilterable =

true;

 

columnaRequisito.TextAlignment =

TextAlignment.Left;

 

definicionTablaHija.FieldDescriptors.Add(columnaRequisito);

 

definicionTablaHija.DataSource =

App.Current.ServicioSISVE.RequisitoEvaluacions;

 

definicionTablaHija.Relation = relacion;

GridViewDetalleEvaluacion.TableDefinition.ChildTableDefinitions.Add(definicionTablaHija);

}

The problem is when I run the application, the grid is empty.This code has worked perfectly in Q2 release, but in Q3, It doesn't working.
Somebody knows what's happening?

Thanks a lot...

0
Krishna Kishor Bhat
Top achievements
Rank 1
answered on 25 Nov 2009, 08:09 AM

Hi Juan,

Try removing the code
GridViewDetalleEvaluacion.TableDefinition.ChildTableDefinitions.Add(definicionTablaHija);

and add

 

xmlns

 

:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"

 

 

 

 

 

 

 

<

 

telerik:RadGridView.ChildTableDefinitions>

 

 

 

    <telerik:GridViewTableDefinition />

 

 

 

 

</telerik:RadGridView.ChildTableDefinitions>

in your xaml. This had worked for me. Hope it helps :)

Regards,
Krishna

 

 

 

 

 

0
Juan Esteban Giraldo Gómez
Top achievements
Rank 1
answered on 25 Nov 2009, 12:43 PM
Hi Krishna,

Thanks for your response, could you send me the complete code behind of this section when you define the GridViewTableDefinition and the relation. How can I associate the GridViewTableDefinition in the code behind with the ChildTableDefinition created in the xaml.

Thanks a lot...


Juan E. Giraldo
Tags
GridView
Asked by
david ocasio
Top achievements
Rank 1
Answers by
Vlad
Telerik team
david ocasio
Top achievements
Rank 1
Krishna Kishor Bhat
Top achievements
Rank 1
Juan Esteban Giraldo Gómez
Top achievements
Rank 1
Share this question
or