Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1650
Explicitly Refresh Records
posted

Hi all

My records contain unbound cells which display data based on on a presenter style and a converter. For these cells, the grid is not aware if the underlying data changes - which results in a faulty representation of my data. What I'm looking for is a way to refresh a record according to the functionality provided by WinGrid. I'm pretty sure there must be something, but I couldn't figure out where... Hmm

Thanks for your advice

Philipp 

 

ps: I think this problem is one of the shortcomings of the BindingPath string of an unbound field. It sure would be nice if we just could use a real binding instead:
<igDP:UnboundField Value="{Binding ...}" />

 

Parents Reply
  • 8576
    Offline posted in reply to Philipp Sumi
    Hi Philipp -
     
    If you can attach a simple but complete repro project I will take a look at this here.
     
    Joe Modica
     

     Hello Joe

     Unfortunately, this doesn't work - nothing happens at all. My cell looks as follows:

               <igDP:UnboundField Name="EditStatus"
                                 Label=""
                                 BindingPath="IsDirty">
                <igDP:Field.Settings>
                  <igDP:FieldSettings AllowEdit="False"
                                      CellClickAction="SelectRecord"
                                      CellValuePresenterStyle="{StaticResource Grid_SimpleStatusCell}" />
                </igDP:Field.Settings>
              </igDP:UnboundField>

     

    And this is my style:

      <Style x:Key="Grid_SimpleStatusCell"
             TargetType="{x:Type igDP:CellValuePresenter}">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">
              <StackPanel Orientation="Horizontal">
                <Image Source="/Shared/Images/EditStatus/Changed.png"
                       VerticalAlignment="Center"
                       HorizontalAlignment="Left"
                       Width="16"
                       Height="16"
                       Margin="2,0,2,0"
                       Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Record.DataItem.IsDirty, Converter={StaticResource Control_BoolToVisibilityConverter}}" />
              </StackPanel>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>

    The style sets the Visibility property of a status image using a converter along with the IsDirty property of the underlying data item. I used your snippet in the RecordUpdated event handler of the grid. At this moment, IsDirty has changed to true. However, the converter is not being invoked so I'm still stuck... Version, btw. is 7.2 RC

    Thanks for your advice

    Philipp 



    http://forums.infragistics.com/forums/p/1435/13095.aspx#13095

Children