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

RadGridView populate Template

1 Answer 80 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Liliana
Top achievements
Rank 1
Liliana asked on 25 Oct 2012, 04:57 PM
Hello,
I´m working with radgridview for winforms, I'm a begginer in it, and I have a problem, I don't know how to populate the template of de grid, I try with this code:

Private

 

 

Sub rgvProgramacionEntregasCabecero_ChildViewExpanded(sender As Object, e As Telerik.WinControls.UI.ChildViewExpandedEventArgs) Handles rgvProgramacionEntregasCabecero.ChildViewExpanded

 

 

 

Try

 

 

 

'gvtProgramacionEntregasDetalle.DataSource = Obtener_DetalleViaje(rddlCentroDistribucion.SelectedValue, Today.AddDays(-30), _GrupoViaje)

 

 

 

Me.rgvProgramacionEntregasCabecero.Templates(0).DataSource = Obtener_DetalleViaje(rddlCentroDistribucion.SelectedValue, Today.AddDays(-30), _GrupoViaje)

 

 

 

 

End Using

 

 

 

Catch ex As Exception

 

 

 

RadMessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, RadMessageIcon.Error)

 

 

 

End Try

 

 

 

End Sub

 


but it doesn't work as I expected, when I expanded the principal grid, the template(or de child grid) is empty, so the function Obtener_DetalleViaje return information... I'm not shure it is the way to populate it, someone can help me?
I hope to be clear, thanks in advance

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 30 Oct 2012, 03:27 PM
Hello Liliana,

Thank you for writing.

I would suggest that you take a look at our Hirarchical Grid section in the online documentation, where you can find out what are the possible ways to create hierarchical grid and how to do that. Here is a link to this section: http://www.telerik.com/help/winforms/gridview-hierarchical-grid-binding-to-hierarchical-data.html.

I hope this helps.
 
Kind regards,
Stefan
the Telerik team
Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
GridView
Asked by
Liliana
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or