Hi there,
Iam using a radgrid for that we are creating Parent-child relation programatically.It works fine for the first time (refer screen shot1) when loading. But if we have done any update operation or if we are again trying to load the page.It is creating multiple tables in the Child grid view(refer screen shot 2).We are calling that creating relation method again in Update operation if it is not called the changes done are not reflecting in the child grid.Here is the code how we are programatically binding.
Production release is scheduled very soon it's need to be resolved asap.Looking forward for your reply.
Thanks,
Prasad
Iam using a radgrid for that we are creating Parent-child relation programatically.It works fine for the first time (refer screen shot1) when loading. But if we have done any update operation or if we are again trying to load the page.It is creating multiple tables in the Child grid view(refer screen shot 2).We are calling that creating relation method again in Update operation if it is not called the changes done are not reflecting in the child grid.Here is the code how we are programatically binding.
radGrid_MultiplePI.DataSource = Nothing Dim ds1 As New DataSet() Dim ds2 As New DataSet() ds1 = objdalProtocolSetupWizard.displayProtocolandInstitutions(cmbProtocolNumber.SelectedValue) Me.radGrid_MultiplePI.MasterGridViewTemplate.DataSource = Nothing Me.radGrid_MultiplePI.MasterGridViewTemplate.AllowAddNewRow = False Me.radGrid_MultiplePI.MasterGridViewTemplate.AllowDeleteRow = False radGrid_MultiplePI.DataSource = ds1.Tables("Institutions") radGrid_MultiplePI.Columns(1).IsVisible = False radGrid_MultiplePI.Columns(1).Width = 150 radGrid_MultiplePI.Columns(2).Width = 150 Dim template As New GridViewTemplate() template.BeginInit() template.DataSource = Nothing radGrid_MultiplePI.MasterGridViewTemplate.ChildGridViewTemplates.Insert(0, template) template.AllowAddNewRow = False template.AllowEditRow = False template.AllowDeleteRow = False template.DataSource = ds1.Tables("Investigators") Dim relation As New GridViewRelation(radGrid_MultiplePI.MasterGridViewTemplate) relation.ChildTemplate = template relation.RelationName = "InstitutionInvestigators" relation.ParentColumnNames.Add("ID") relation.ChildColumnNames.Add("ID") template.Columns(0).Width = 100 template.Columns(1).Width = 100 template.Columns(0).IsVisible = False radGrid_MultiplePI.Relations.Add(relation) template.EndInit() radGrid_MultiplePI.Refresh()Thanks,
Prasad