DataBinding Problem in RibbonView Backstage with WPF MVVM

4 posts, 0 answers
  1. Srinivasareddy
    Srinivasareddy avatar
    5 posts
    Member since:
    Sep 2012

    Posted 13 Sep 2012 Link to this post

    Hi Team,

    I am working with WPF MVVM using RadRibbonView.
    DataBinding not Working inside Ribbonview Backstage.

    <telerik:RadRibbonView >
     <telerik:RadRibbonView.Backstage >
                    <telerik:RadRibbonBackstage>
     <telerik:RadRibbonBackstageItem Header="Rooms Layout">
                            <Grid Background="Gainsboro">
                                <Grid.RowDefinitions >
                                    <RowDefinition Height="100"></RowDefinition>
                                    <RowDefinition Height="100"></RowDefinition>
                                </Grid.RowDefinitions>
                                <TextBox Text="Sample" Foreground="Green" Width="100" Grid.Row="0" Name="txtSample">  </TextBox>
                                <TextBlock Background="Green" Foreground="Yellow" Text="{Binding ElementName=txtSample,Path=Sample}" Width="100" Grid.Row="1"></TextBlock>
                            </Grid>
                        </telerik:RadRibbonBackstageItem>
     </telerik:RadRibbonView.Backstage >
                    </telerik:RadRibbonBackstage>
    </telerik:RadRibbonView >

    Please help me.
    Thanks,
    Srinivas.

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 14 Sep 2012 Link to this post

    Hello Srinivas,

    Are you refereeing to this line of code:
    <TextBlock Background="Green" Foreground="Yellow" Text="{Binding ElementName=txtSample,Path=Sample}" Width="100" Grid.Row="1"></TextBlock>
    because I noticed that you're trying to bind this TextBlock Text property to a Sample property of a TextBox. I think you meant to bind it to the Text property instead:
    <TextBlock Background="Green" Foreground="Yellow"
                        Text="{Binding ElementName=txtSample,Path=Text}"
                        Width="100" Grid.Row="1"></TextBlock>
     Please change that and let me know if this was the issue or I'm missing something.

    Kind regards,
    Tina Stancheva
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. UI for WPF is Visual Studio 2017 Ready
  4. shankar parshimoni
    shankar parshimoni avatar
    18 posts
    Member since:
    Sep 2012

    Posted 27 Sep 2012 Link to this post

    Hello Hi ,
    I have one combobox ,one button and one gridview in wpf page .my task is ,when ever we select value in the combobox and click on the button ,selected value related information should be displayed in te GridView from the database..task is being devloped in mvvm pattern please tell me how can i show values in GridView.
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 02 Oct 2012 Link to this post

    Hello Shukreya,

    From your description I gather you need to create a master-detail scenario. If this is indeed the case, you can bind the RadComboBox ItemsSource to a collection of data and use the selected item in the ComboBox control to populate the RadGridView.ItemsSource collection.

    You can take a look at this blog post describing how to implement a master-detail scenario using two RadGridView controls and you can also take a look at the FirstLook demo of the RadComboBox demonstrating a sample master-detail scenario as well.

    If you encounter any issues with the RadControls while building your solution, you can post them through our support ticketing system specifying the control the issues are related to. This way we'll be able to manage your queries more precisely and forward them to the respective developers if needed.

    Kind regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top