Showing a progress bar on RadGridView at each row-level?

3 posts, 1 answers
  1. Enric
    Enric avatar
    32 posts
    Member since:
    Apr 2013

    Posted 31 Jan 2014 Link to this post

    A picture is worth a thousand words, so I attach you my need.

    Obvioulsy such image belong to the classical GridView incorporated by defaul on VS Studio 2012 stuff.

    That's the XAML code for that:

    <DataGridTemplateColumn Header="Actual" Width="80" Visibility="Visible">
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <ProgressBar Value="{Binding Path=Stock_Actual, Mode=OneWay}" Minimum="0" Maximum="{Binding Stock_max}" />
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
    Thanks in advance for your help,
  2. Answer
    Hristo
    Admin
    Hristo avatar
    41 posts

    Posted 05 Feb 2014 Link to this post

    Hello Enric,

    You can create a custom column in RadGridView by using the same approach. I have included a code snippet demonstrating how to override the cell template and to add a RadProgressBar as default content.
    <telerik:GridViewDataColumn>
    <telerik:GridViewDataColumn.CellTemplate>
    <DataTemplate>
    <telerik:RadProgressBar Minimum="0" Maximum="100" Value="42" Width="50"/>
    </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
    </
    telerik:GridViewDataColumn>

    More information on creating custom columns can be found in this blog post which explains the process in details, and you can also see the following article in our online documentation.

    Regards,
    Hristo
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Enric
    Enric avatar
    32 posts
    Member since:
    Apr 2013

    Posted 06 Feb 2014 in reply to Hristo Link to this post

    Thanks a lot Hristo
Back to Top