Customising HeaderTemplate

3 posts, 0 answers
  1. Chris
    Chris avatar
    51 posts
    Member since:
    Sep 2010

    Posted 26 Sep 2010 Link to this post


    I have added some custom commands to my RadPane's HeaderTemplate and TitleTemplate as follows:

    <telerikSchema:RadMenuItem CommandTarget="{Binding}" CommandParameter="{Binding}" Command="DashboardCommands:DashboardContentCommands.DeleteContentCommand" Header="{Binding Command.Text, RelativeSource={RelativeSource Self}}" />

    The DataContext for each Pane is being set programmatically to a business object and when the commands above fire I would like the business object passed as the CommandParameter. However the CommandParamter is always passed as the string value that the Title or Header property is being set to. I am binding the Header and Title properties to the relevant business object property programatically as follows:

    pane.SetBinding(RadPane.HeaderProperty, new Binding() { Source = contentItem, Path = new PropertyPath("ContentName") });
    pane.SetBinding(RadPane.TitleProperty, new Binding() { Source = contentItem, Path = new PropertyPath("ContentName") });

    Any ideas how I can get the CommandParameter to pass the DataContext of the parent RadPane as opposed to the value of ContentName?


  2. George
    George avatar
    1332 posts

    Posted 30 Sep 2010 Link to this post

    Hello Chris,

    Thank you for reporting this, it helps us in improving our products. The Title property is type of string with the current implementation of RadPane. We will consider changing it to object type in our of our future releases. This will resolve the problem you have with the data binding. You can track its progress in our Public Issue Tracking System (PITS) with Issue ID = 3603.

    Please do not hesitate to contact us if you require any further information.

    Kind regards,
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. NOC NOC
    NOC NOC avatar
    6 posts
    Member since:
    Mar 2010

    Posted 31 Dec 2010 Link to this post

Back to Top