Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

DvdKhl

@DvdKhl
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Manually Updating GridViewColumn with DisplayMemberBinding binding set
    D DvdKhl

    Hi, I have a ListView with a GridView like this:

    <GridView>
    <GridViewColumn Header="Type" Width="Auto"
    DisplayMemberBinding="{Binding Path=Type, Converter={StaticResource enumConverter}, Mode=OneWay}"/>
    <GridViewColumn Header="Optimal" Width="60"
    DisplayMemberBinding="{Binding Path=OptimalAttributeMass, Mode=OneWay, Converter={StaticResource doubleConverter}}"/>
    <GridViewColumn Header="Nominal" Width="60"
    DisplayMemberBinding="{Binding Path=NominalAttributeMass, Mode=OneWay, Converter={StaticResource doubleConverter}}"/>
    <GridViewColumn Header="Control" Width="100">
    <GridViewColumn.CellTemplate>
    <DataTemplate>
    <DockPanel>
    <Button DockPanel.Dock="Right" Content="Raise" Click="RaiseAttribute_Click"/>
    <!--<TextBox/>-->
    </DockPanel>
    </DataTemplate>
    </GridViewColumn.CellTemplate>
    </GridViewColumn>
    </GridView>

    The only problematic column is:

    <GridViewColumn Header="Nominal" Width="60"
    DisplayMemberBinding="{Binding Path=NominalAttributeMass, Mode=OneWay, Converter={StaticResource doubleConverter}}"/>

    The NominalAttributeMass property is time dependent and always changes its value, so I can't implement INotifyPropertyChanged for it. Usually (when using a TextBlock) I just get the BindingExpression from the Control (with GetBindingExpression) and call UpdateTarget on it. But in this case there is no GetBindingExpression and the DisplayMemberBinding property is of the type BindingBase, where the function UpdateTarget doesn't exist. What is the proper way to Update the column?

    WCF and WF question wpf wcf announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups