busyindicator on the single row

6 posts, 0 answers
  1. Paolo
    Paolo avatar
    423 posts
    Member since:
    Jun 2009

    Posted 04 Jan 2012 Link to this post

    hello Telerik,
    I'm trying to define a style for a single row... I wish to have a radbusyindicator surrounding each row (i've got an even that takes some time then update a field on the current row)

    what sphould I put for template as gridviewrow? should I dfine each column and how?
    thanks
    Paolo
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 04 Jan 2012 Link to this post

    Hello,

     


    Generally you may predefine the template of GridViewRow and place a single RadBusyIndicator on the top of the row and set its Visibility Property to Collapsed. Then based on your custom logic you may find the BusyIndicator and set its Visibility property to Visible, IsBusy property to True and any relevant settings based on your particular case. 



    Kind regards,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Paolo
    Paolo avatar
    423 posts
    Member since:
    Jun 2009

    Posted 04 Jan 2012 Link to this post

    Hello Vanya ,
    thanks for reply. Can you please provide me an example?

    This is my code, what's wrong?
    <UserControl [...]>
        <UserControl.Resources>
            <Style x:Key="t1" TargetType="telerik:GridViewRow" >
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="telerik:GridViewRow">
                            <StackPanel>
                                <telerik:RadBusyIndicator x:Name="IsRowBusy">
                                    <telerik:GridViewRow Background="BlueViolet"></telerik:GridViewRow>
                                </telerik:RadBusyIndicator>
                            </StackPanel>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>      
        </UserControl.Resources>
        <telerik:RadBusyIndicator x:Name="IsBusy">
            <Grid cal:Action.TargetWithoutContext="{Binding}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"></RowDefinition>
                </Grid.RowDefinitions>
                <telerik:RadGridView Grid.Row="0" x:Name="DataItems" RowStyle="{StaticResource t1}" AutoGenerateColumns="False"
                                     CanUserInsertRows="False" CanUserDeleteRows="False">
                    <telerik:RadGridView.Columns>
                 [...]
                   </telerik:RadGridView.Columns>
                </telerik:RadGridView>
            </Grid>
        </telerik:RadBusyIndicator>
    </UserControl>



    Thanks for reply
    Paolo
  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 04 Jan 2012 Link to this post

    Hello,

     

    I have prepared small example which illustrates this approach.
    Please take a look at the attachment and let me know how it goes. 


    All the best,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Paolo
    Paolo avatar
    423 posts
    Member since:
    Jun 2009

    Posted 09 Jan 2012 Link to this post

    Hello Vanya,
    I've got still some question about your implementation... I've seen you set the radbusyindicator on true with a trigger
    <Trigger Property="IsInEditMode" Value="True">
                                <Setter Property="Visibility" TargetName="EditIndicator" Value="Visible"/>
                                <Setter Property="Visibility" TargetName="b1" Value="Visible"/>
                            </Trigger>

    I need to set it at true on my boolean property IsRowBusy... How can I do this?

    It seems to me that you always have the busy indicator set to true and you only change the visibility... in my real case I need the busyindicator to contain the whole row and to disable the actions on the row till it finished its elaboration... can you please provide me a sample?
    Thanks
  7. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 09 Jan 2012 Link to this post

    Hi Paolo,

     

    Thank you for getting back to us and for the detailed info about your requirement! You may easily achieve this result using StyleSelectors, just return the appropriate row style based on the IsRowBusy property value of your underlying businness objects. You may keep two different styles the one with the RadBusyIndicator and the default one. When the condition is met just return the appropriate style. 
    Will you verify how this works for you?  



    Greetings,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
UI for WPF is Visual Studio 2017 Ready