Problem with custom column

2 posts, 0 answers
  1. Cameron Molyneux
    Cameron Molyneux avatar
    79 posts
    Member since:
    Jan 2010

    Posted 01 Aug 2012 Link to this post

    I have used a custom column in my grid which contains a radprogressbar (from an example on here! see below)

    When I used this column the first time the grid displays the progress bar values do not display correctly (see picture 1), then after I sort one by clicking one of the column headings the progress bar displays the correct values (see picture 2)

    Any idea why this would happen?  The XAML is also below

    <local:GridViewPercentageColumn DataMemberBinding="{Binding Turnaround, Mode=TwoWay}" DataFormatString="{}{0}%" Header="{Binding Path=CellPathResource.Turnaround, Source={StaticResource ResourcesWrapper}}" />

    #region PercentageColumn
       public class GridViewPercentageColumn : GridViewDataColumn
           public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
               var bar = cell.Content as RadProgressBar;
               if (bar == null)
                   bar = new RadProgressBar();
                   bar.Height = 20;
                   bar.Foreground = new SolidColorBrush(Colors.Green);
                   bar.SetBinding(RadProgressBar.ValueProperty, this.DataMemberBinding);
                   cell.Content = bar;
               return bar;
           public override FrameworkElement CreateCellEditElement(GridViewCell cell, object dataItem)
               var slider = new RadSlider();
               slider.Maximum = 0;
               slider.Maximum = 100;
               slider.SmallChange = 1;
               slider.LargeChange = 10;
               slider.SetBinding(RadSlider.ValueProperty, this.DataMemberBinding);
               return slider;

  2. Maya
    Maya avatar
    4062 posts

    Posted 02 Aug 2012 Link to this post

    Hi Cameron,

    I tried to reproduce the issue you reported, but still without any success. Could you take a look at the sample attached and let me know whether you can get the same behavior on it ? Am I missing something ?

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top