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

RadGridView Flickers when ColumnWidth is set to Fill *

1 Answer 35 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Sreenivasan asked on 14 Feb 2016, 08:46 AM



 I am using RadDropDownButton and RadDropDownContent has a grid with a message and RadGridView.  RadGridview has a single column which has data template that render checkboxes for the elements in list to which this column is bound to.  I get an additional space / extra column at the end of the radgridview.  When I try to remove this column by setting width of the only property to * or set columnwidth of radgridview to * as suggested in the forums,  the grid just keeps on flickering.  I seem to be missing something very simple.  Any help on removing this extra space is appreciated..




<Window x:Class="MainWindow"
    Title="MainWindow" Height="350" Width="525">
    <telerik:RadDropDownButton DropDownIndicatorVisibility="Collapsed" 
                                               ToolTip="Configure Column Set"
                                               IsOpen="{Binding IsDropDownContentOpen, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                               Command="{Binding ConfigureColumnSetCommand}">


            <Grid Margin="10">

                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <ColumnDefinition />

                <!-- Configure Column Set Text-->
                <TextBlock x:Name="txtConfigColumnSetMsg"
                                               Text="Select columns to be visible in grid" />

                <!-- Configure Column Set Grid -->
                <telerik:RadGridView x:Name="grdConfigureColumnSet"
                                                         ItemsSource="{Binding ColumnSet,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                                         IsFilteringAllowed="False" >


                                                     DataMemberBinding="{Binding IsSelected,UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"

                                    <CheckBox IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger= PropertyChanged}"
                                                                  Content="{Binding Name}" />




Code behind -

 Class MainWindow

    Public Sub New()

        ' This call is required by the designer.

        ' Add any initialization after the InitializeComponent() call.
        Me.DataContext = New MyViewModel
    End Sub

End Class

Public Class MyViewModel

    Public Sub New()

        ColumnSet.Add(New ColumnItem With {.Name = "Col1", .IsSelected = False})

    End Sub

    Public Property ColumnSet As New List(Of ColumnItem)

End Class

Public Class ColumnItem

    Public Property Name As String

    Public Property IsSelected As Boolean

End Class






1 Answer, 1 is accepted

Sort by
Telerik team
answered on 17 Feb 2016, 03:36 PM
Hi Sreeni,

Thanks for the provided code demonstrating the usage of the control.

After reviewing it, it seems that with the current implementation, RadGridView is measured with infinity. In order to avoid the flickering in this scenario, you can try setting the RowIndicatorVisibility of RadGridView to "Hidden" instead of "Collapsed", or simply set a fixed value for the Width property of the control.

All the best,
Stefan X1
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 Feedback Portal and vote to affect the priority of the items
General Discussions
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question