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
275
setting update source trigger
posted

When I am using the datagrid and enter a value in a cell and click save the value I just entered is lost. Only when I move focus into another cell will the value get saved.

I tried setting the updatesourcetrigger=Propertychanged also but still it's not working . I have written the code below:

 

 

<

 

Controls1:LipperGrid GroupByAreaLocation="None" Margin="0" Width="580" BorderThickness="0" AutoFit="False" HorizontalAlignment="Stretch" DataSource="{Binding PSNDCAssetAllocation}" Theme="Office2k7Silver" x:Name="lstNonDCAssets1" CellUpdated="lstNonDCAssets1_CellUpdated" CellUpdating="lstNonDCAssets1_CellUpdating" EditModeValidationError="lstNonDCAssets1_EditModeValidationError">

 

 

<Controls1:LipperGrid.FieldLayoutSettings>

 

 

 

<DataPresenter:FieldLayoutSettings AutoGenerateFields="False" />

 

 

 

</Controls1:LipperGrid.FieldLayoutSettings>

 

 

 

<Controls1:LipperGrid.FieldLayouts>

 

 

 

<DataPresenter:FieldLayout>

 

 

 

<DataPresenter:FieldLayout.Fields>

 

 

 

<DataPresenter:Field Name="AssetDescription" Label="Allocation Type">

 

 

 

<DataPresenter:Field.Settings>

 

<DataPresenter:FieldSettings AllowEdit="False" LabelClickAction="Nothing" CellWidth

="200" />

 

 

</DataPresenter:Field.Settings>

 

</DataPresenter:Field

>

 

 

 

 

<DataPresenter:Field Name="Value" Label

="Assets value in %">

 

 

 

 

<DataPresenter:Field.Settings

>

 

 

 

 

<DataPresenter:FieldSettings CellWidth="20" LabelClickAction="Nothing" EditorType="{x:Type igEditors:XamTextEditor}" AllowEdit="True" CellClickAction

="EnterEditModeIfAllowed">

 

 

 

 

<DataPresenter:FieldSettings.EditorStyle

>

 

 

 

 

<Style TargetType="{x:Type igEditors:XamTextEditor

}">

 

 

 

 

<Style.Setters

>

 

 

 

 

<Setter Property="ValueType" Value="{x:Type sys:Decimal

}"/>

 

 

 

 

<Setter Property="Format" Value

="######0.###"/>

 

 

 

 

<Setter Property="HorizontalAlignment" Value

="Center"/>

 

 

 

 

</Style.Setters

>

 

 

 

 

</Style

>

 

 

 

 

</DataPresenter:FieldSettings.EditorStyle

>

 

 

 

 

</DataPresenter:FieldSettings

>

 

 

 

 

</DataPresenter:Field.Settings

>

 

 

 

 

</DataPresenter:Field

>

 

 

 

 

<DataPresenter:Field Name="ModDate" Label

="Last Modified Date" >

 

 

 

 

<DataPresenter:Field.Settings

>

 

 

 

 

<DataPresenter:FieldSettings AllowEdit="False" LabelClickAction="Nothing" CellWidth

="20"/>

 

 

 

 

</DataPresenter:Field.Settings

>

 

 

 

 

</DataPresenter:Field

>

 

 

 

 

<DataPresenter:Field Name="ModUser" Label

="Last Modified By" >

 

 

 

 

<DataPresenter:Field.Settings

>

 

 

 

 

<DataPresenter:FieldSettings AllowEdit="False" LabelClickAction="Nothing" CellWidth

="20"/>

 

 

 

 

</DataPresenter:Field.Settings

>

 

 

 

 

</DataPresenter:Field

>

 

 

 

 

</DataPresenter:FieldLayout.Fields

>

 

 

 

 

</DataPresenter:FieldLayout

>

 

 

 

 

</Controls1:LipperGrid.FieldLayouts

>

 

 

 

 

</Controls1:LipperGrid

>

 

 

 

 

Parents
No Data
Reply
  • 69686
    Suggested Answer
    posted

    Hello,

    This is because the Editor in that cells updates the underlying data object when it ends edit mode. By default, the edit mode ends when the editor loses focus. If  you want the data to be updated immediately, when clicking the Save Button, you have to call EndEditMode(...) method of the ValueEditor of that cell.

    Please let me know if you have any more questions on this.

     

Children