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

Ghost Row appear in RadGridView

4 Answers 167 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Armando
Top achievements
Rank 1
Armando asked on 23 Oct 2009, 10:44 PM
Please help me!!!!

Hi guys!!!, Im realy scared in my RadGrid appear a ghost row, when this show 2 or more rows whit child, this event takes place when in other RadGrid changes the selection item, attach image, my code for this radGrid is the next:
                    DataTable _dtStudy =  wpfWebServexCore.ServiceGeneralClass.studys(((DataRow)rgvPatients.SelectedItem).ItemArray[0].ToString());
                    _idPatient = ((DataRow)rgvPatients.SelectedItem).ItemArray[0].ToString();
                    rgvSeries.ItemsSource = _dtStudy;
                    rgvSeries.DataMember = _dtStudy.TableName;
                    if (rgvSeries.TableDefinition.ChildTableDefinitions.Count > 0)
                    {
                        for (int i = 0; i < rgvSeries.TableDefinition.ChildTableDefinitions.Count; i++)
                        {
                            rgvSeries.TableDefinition.ChildTableDefinitions.RemoveAt(i);
                        }
                    }

                    foreach (DataRow _dr in _dtStudy.Rows)
                    {
                         
                        GridViewTableDefinition definition = new GridViewTableDefinition();
                        definition.AutoGenerateFieldDescriptors = false;
                        definition.DataSource = wpfWebServexCore.ServiceGeneralClass.series(_dr["StudyInstanceUID"].ToString());

                        //rgvSeries.UpdateLayout();

                        TableRelation _relation = new TableRelation();
                        _relation.FieldNames.Add(new FieldDescriptorNamePair("StudyInstanceUID", "StudyInstanceUID_FKey"));
                        definition.Relation = _relation;

                        rgvSeries.TableDefinition.ChildTableDefinitions.Add(definition);
                       
                        rgvSeries.AddHandler(GridViewDataControl.RowValidatingEvent, new EventHandler<GridViewRowValidatingEventArgs>(this.selectChild_clik));
                        
                    }
                    ((ExpandableDataRecord)rgvSeries.Records[0]).IsExpanded = true;
                    wpfWebServexCore.ClassGlobal.DtStudy = _dtStudy;
                    rgvImages.ItemsSource = new DataTable();

AND the XAML

 <telerik:RadGridView Height="auto" Name="rgvSeries" Width="auto" SelectionChanged="rgvSeries_SelectionChanged" ShowGroupPanel="False" IsFilteringAllowed="False" telerik:StyleManager.Theme="Office_Black" IsReadOnly="True" AutoGenerateColumns="False" ItemsSource="{Binding}" MouseDoubleClick="buttonAbrirEstudio_Click" CanUserReorderColumns="True" CanUserResizeColumns="True" CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed" Background="White" ColumnsWidthMode="Fill" HorizontalAlignment="Right" VerticalAlignment="Top">
                                <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn HeaderText="UID" UniqueName="StudyInstanceUID" DataType="{x:Null}"   IsVisible="False" />
                                <telerik:GridViewDataColumn HeaderText="Fecha" UniqueName="Fecha" DataType="{x:Null}"  />
                                <telerik:GridViewDataColumn HeaderText="Descripción" UniqueName="Descripcion" DataType="{x:Null}"  />
                                <telerik:GridViewDataColumn HeaderText="Modalidad" UniqueName="Modalidad" DataType="{x:Null}"  />
                                <telerik:GridViewDataColumn HeaderText="Medico" UniqueName="Medico" DataType="{x:Null}"  />
                                <telerik:GridViewDataColumn HeaderText="Reporte" UniqueName="Reporte" DataType="{x:Null}"  />
                            </telerik:RadGridView.Columns>
                                    
                            <telerik:RadGridView.HierarchyChildTemplate>
                                <DataTemplate>
                                    <Border BorderBrush="#FFFDDFAA" BorderThickness="2" Margin="20,2">
                                      
                                       
                                        <telerik:RadGridView x:Name="rgvhijoSerie" IsFilteringAllowed="False" ShowGroupPanel="False" IsReadOnly="True" SelectionChanged="rgvhijoSerie_SelectionChanged" MouseDoubleClick="buttonAbrirEstudio_Click" RowIndicatorVisibility="Collapsed"  CanUserFreezeColumns="False" ShowColumnHeaders="False" Background="White" GridLinesVisibility="None">                                            
                                            <telerik:RadGridView.Columns>
                                                <telerik:GridViewDataColumn HeaderText="UID" UniqueName="StudyInstanceUID" DataType="{x:Null}"  IsVisible="False" />
                                               

                                                <telerik:GridViewDataColumn HeaderText="Fecha" UniqueName="" DataType="{x:Null}" Width="auto" IsVisible="False"  />
                                                <telerik:GridViewDataColumn HeaderText="Descripción" UniqueName="Descripcion" DataType="{x:Null}" Width="auto" />
                                                <telerik:GridViewDataColumn HeaderText="Modalidad" UniqueName="" DataType="{x:Null}" Width="auto" IsVisible="False"/>
                                                <telerik:GridViewDataColumn HeaderText="Medico" UniqueName="" DataType="{x:Null}" Width="auto" IsVisible="False" />
                                                <telerik:GridViewDataColumn HeaderText="Reporte" UniqueName="" DataType="{x:Null}" Width="auto" IsVisible="False" />

                                            </telerik:RadGridView.Columns>                                            
                                        </telerik:RadGridView>
                                        
                                       
                                    </Border>
                                </DataTemplate>
                            </telerik:RadGridView.HierarchyChildTemplate>                            
                        </telerik:RadGridView>
 

Pleas help me, or can you give me any idea

Regards!!

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 29 Oct 2009, 06:35 AM
Hello Armando,

Since we reworked our rows creation completely can you try our latest beta to see what will be the result in your scenario?

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
Armando
Top achievements
Rank 1
answered on 29 Oct 2009, 03:11 PM
How can i solve this problem because, I want to buy this controls but it has the problem with the ghost rows, could you help me and tell me when check out the new version


Regards!!
0
Accepted
Hristo
Telerik team
answered on 29 Oct 2009, 05:28 PM
Hello Armando ,

If you want to check our beta you can download it from Your Account->Free Trials->Rad Controls for WPF->Q3 2009 Beta 2.

Otherwise you can wait until next week when our Q3 2009 official release will be shipped.

Regards,
Hristo
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
Armando
Top achievements
Rank 1
answered on 29 Oct 2009, 10:00 PM
Ok, I'm try this beta, and I will wait for buying this product.

Thanks!!

Tags
GridView
Asked by
Armando
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Armando
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or