We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

UnBound Column with expression not updating (UI)

Hello,

I am using SfDataGrid with definition:

ItemsSource="{Binding Path=Items}"
NavigationMode="Cell"
AllowEditing="True"
LiveDataUpdateMode="AllowDataShaping"

I am using 2 numeric columns and 1 unbound column with expression

When I doubleClick cell 1, I made change, but UnboundColumn is not refreshing (change is not visible in the grid).
In the object, data is changed (I see that when I try to save data from grid).

I can see the change when I doubleClick UnboundColumn and when that column enter edit mode, expression is executed.

DisplayBinding="{Binding Col1}" MappingName="Col1"
DisplayBinding="{Binding Col2}" MappingName="Col2"
Expression="Col1 * Col2" MappingName="MultCols"

I was looking at example in Studio 14.1.0.41 for DataGrid -> Editing -> UnBound Column and everything is working.

I can not figure it out, where I am wrong, and why my columns does not reflect expression after changes.

Thank You.


7 Replies

SV Srinivasan Vasu Syncfusion Team May 25, 2016 07:16 AM UTC

Hi Vladimir, 
 
Thanks for contacting Syncfusion support. 
 
We have analyzed your query and the GridUnboundColumn is updated properly when we edit the value in corresponding column. Could you please confirm whether you are implemented INotifyPropertyChanged interface in underlying Model class? You have to derive the Underlying type from INotifyPropertyChanged to update the value in UnBoundColumn at run time. 
 
For more details about INotifyPropertyChanged, please refer below link 
 
Regards,
Srinivasan 
 



VC Vladimir Culum May 25, 2016 07:58 AM UTC

Hi Srinivasan,

INotifyPropertyChanged is implemented.

Everything else is working.
I tested also moment when property is changed to show info in messageBox, and it is working.

It is just that UI is updating when I click on that cell that need to be updated.

Thank You.


VC Vladimir Culum May 25, 2016 08:55 AM UTC

update:

My View is bound to ViewModel.
ViewModel have : NotificationObject

My object is ObservableCollection that raises property changes:

private ObservableCollection<Item> _Items;
        public ObservableCollection<Item> Items
        {
            get { return _invoiceItems; }
            set
            {
                _invoiceItems = value;
                RaisePropertyChanged("Items");
            }
        }


VC Vladimir Culum May 25, 2016 09:04 AM UTC

Srinivasan,

Thank You for the clue (I didn`t see it in the first time).
Column is updating.

In the model class of Items I didn`t set NotificationObject that raises notification.

This is resolved.

Thank You.


SV Srinivasan Vasu Syncfusion Team May 25, 2016 06:40 PM UTC

Hi Vladimir, 
  
Thanks for your update. 
  
Regards, 
Srinivasan 



VC Vladimir Culum May 26, 2016 12:04 PM UTC

Srinivasan,

I have one more issue.

I have TableSummaryRow for UnBoundColumn that is not updating after change. UnBound columns updates now (with expression), bu summary not:

<syncfusion:SfDataGrid.TableSummaryRows>
                                    <syncfusion:GridSummaryRow ShowSummaryInRow="False">
                                        <syncfusion:GridSummaryRow.SummaryColumns>
                                            <syncfusion:GridSummaryColumn Name="MultColsTotal"
                                                          Format="'{Sum:F2}'"
                                                          MappingName="MultCols"
                                                          SummaryType="DoubleAggregate" />

Is there possible to apply summary for UnBound Column?

Thank You.


SV Srinivasan Vasu Syncfusion Team May 30, 2016 03:32 AM UTC

Hi Vladimir, 
 
We considered this “Summary updating for UnBoundColumn” as feature in SfDataGrid and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates. 
 
Regards, 
Srinivasan 


Loader.
Live Chat Icon For mobile
Up arrow icon