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

Wierd GridView Behavior

5 Answers 33 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mateen
Top achievements
Rank 1
Mateen asked on 10 May 2011, 10:51 AM
Hi,

I am facing a wired GridView behavior. I have a GridView bound to a List of Objects. Nested inside is a RowDetailsTemplate and nested in that is a DataTemplate.

Now what is happening is that when i expand the last row of the Grid, scroll bars appear. whne i scroll down and then up all the rows expand. I haven't set any such property. And dont know how to control this. also when i select one row different rows are been selected.Below is the Xaml of the code. Could anyone please help. Really need your help. Thanks.

<telerik:RadGridView HorizontalAlignment="Stretch" Name="EditBatchAssignmentGrid"
                            DataLoadMode="Synchronous" ItemsSource="{Binding}"
                            RowIndicatorVisibility="Collapsed"
                            AutoGenerateColumns="False"
                            IsFilteringAllowed="False" Width="Auto"
                            CanUserResizeColumns="True"
                            ShowGroupFooters="True"
                            IsReadOnly="True"
                            ShowGroupPanel="False"
                            ColumnWidth="auto"
                            DataContext="static"
                            AlternateRowBackground="#FFFF84" RowHeight="25"
                            Background="#FFFFCE"
                            CanUserSortColumns="False" Grid.Column="1" Grid.Row="6" Grid.ColumnSpan="5" Grid.RowSpan="2" ActionOnLostFocus="None" RowDetailsVisibilityChanged="EditBatchAssignmentGrid_RowDetailsVisibilityChanged">
           <telerik:RadGridView.Resources>
               <Style TargetType="telerik:GridViewHeaderCell">
                   <Setter Property="Background" Value="#FDF053"/>
                   <Setter Property="Foreground" Value="Black"/>
                   <Setter Property="FontWeight" Value="Bold"/>
                   <Setter Property="FontSize" Value="11"/>
                   <Setter Property="BorderThickness" Value="0"/>
               </Style>
               <Style TargetType="telerik:GridViewHeaderRow" >
                   <Setter Property="Background" Value="#FDF053"/>
                   <Setter Property="Foreground" Value="Black"/>
                   <Setter Property="FontWeight" Value="Normal"/>
                   <Setter Property="FontSize" Value="11"/>
                   <Setter Property="Height" Value="40"/>
                   <Setter Property="BorderThickness" Value="0"/>
               </Style>
               <Style TargetType="telerik:GridViewRow">
                   <Setter Property="Background" Value="#FFFFCE"/>
                   <Setter Property="BorderThickness" Value="0"/>
               </Style>
           </telerik:RadGridView.Resources>
           <telerik:RadGridView.Columns>
               <telerik:GridViewToggleRowDetailsColumn IsResizable="False" />
               <telerik:GridViewDataColumn  DataMemberBinding="{Binding AssignmentNumber}"  Header="Assignment No"/>
               <telerik:GridViewDataColumn  DataMemberBinding="{Binding SPReferenceNumber}"  Header="SP Reference"/>
               <telerik:GridViewDataColumn  DataMemberBinding="{Binding VehicleSize}"  Header="Vehicle Size"/>
               <telerik:GridViewDataColumn  DataMemberBinding="{Binding Segment}"  Header="Segment"/>
               <telerik:GridViewDataColumn  DataMemberBinding="{Binding QualityLevel}"  Header="Quality Level"/>
               <telerik:GridViewDataColumn  DataMemberBinding="{Binding RedemptionStatus}"  Header="Redemption Status"/>
           </telerik:RadGridView.Columns>
           <telerik:RadGridView.RowDetailsTemplate>
           <DataTemplate>
            <Grid>
                       <Grid.ColumnDefinitions>
                           <ColumnDefinition/>
                       </Grid.ColumnDefinitions>
                       <Grid.RowDefinitions>
                           <RowDefinition/>
                           <RowDefinition Height="20"/>
                           <RowDefinition/>
                           <RowDefinition Height="10"/>
                           <RowDefinition/>
                           <RowDefinition Height="10"/>
                       </Grid.RowDefinitions>
 
 
 
 
                       <Button Name="validateBatchItems" Content="Validate" Grid.Row="4" Grid.Column="0" Click="validateBatchItems_Click" Width="90" HorizontalAlignment="Right" VerticalAlignment="Center" />   
             </Grid>
               </DataTemplate>
           </telerik:RadGridView.RowDetailsTemplate>
 
       </telerik:RadGridView>

5 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 10 May 2011, 11:16 AM
Hello Mateen,

Based on the code-snippet provided, I have tried to reproduce the issue you reported. However, I was not able to. So, in order to provide you with a more suitable solution, I would need a bit more details - what version of RadControls are you using, how do you handle the RowDetailsVisibilityChanged event ?
Still, I am sending you the sample project I used for testing the case so that you can use it for a reference.

Regards,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mateen
Top achievements
Rank 1
answered on 10 May 2011, 11:40 AM
The RowDetailVisibility event is blank. Not doing anything there. I am using version 4 trial .

Kind Regards,

Mateen

0
Maya
Telerik team
answered on 10 May 2011, 11:42 AM
Hello Mateen,

Are you able to reproduce the same behavior on the sample project attached ? Are there any particular steps that I need to follow in order to reproduce it /
 

Best wishes,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mateen
Top achievements
Rank 1
answered on 10 May 2011, 12:56 PM
Hi Maya,

I am looking into this. Will let you know if any thing happens.

Kind Regards,

Mateen
0
Mateen
Top achievements
Rank 1
answered on 10 May 2011, 02:59 PM
Hi,

Solved it. nothing wrong with the Grid, just i was binding the same object to each row of the DataGrid . Silly Me.

Thanks.

Kind Regards,

Mateen
Tags
GridView
Asked by
Mateen
Top achievements
Rank 1
Answers by
Maya
Telerik team
Mateen
Top achievements
Rank 1
Share this question
or