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.
Unfortunately, activation email could not send to your email. Please try again.

something like OnDisplayValue

Thread ID:

Created:

Updated:

Platform:

Replies:

120488 Sep 20,2015 01:39 PM Sep 24,2015 03:22 AM WPF 3
loading
Tags: SfDataGrid
Michael
Asked On September 20, 2015 01:39 PM

Hi!

DisplayBinding is called (as I've understand) only one time for record.
Does SfDataGrid have event something like OnDisplayValue (for calling each time after repainting).

Sincerely,
Michael



Jai Ganesh S [Syncfusion]
Replied On September 21, 2015 07:42 AM

Hi Michael,


Thank you for using Syncfusion products.


We have analyzed your queries and please find the responses for your queries as below,


Query 1: (DisplayBinding is called (as I've understand) only one time for record)


If we give a MappingName alone in a Column the values are displayed based on the MappingName otherwise if we want to display the value based on other data ,we can use DisplayBinding.


Query 2: (Does SfDataGrid have event something like OnDisplayValue (for calling each time after repainting)


Yes, the SfDataGrid has the CurrentCellValueChanged event which will be triggered when we change the cell values.


Sample:

http://www.syncfusion.com/downloads/support/directtrac/144285/ze/SfDataGridDemo1457743670


If we misunderstood your requirements, could you please share more information about your query? This would be more helpful for us to proceed further.


Please let us know if you have any other query.


Thank you,

Jai Ganesh S


Michael
Replied On September 23, 2015 04:31 AM

I'd like to show cell value (displayed value) depends on value in previous row.
Data in previous row can be changed.

Jayapradha S [Syncfusion]
Replied On September 24, 2015 03:22 AM

Hi Michael,

Thank you for your update.

We have analyzed your requirement. You can change the value of next row based on previous cell value in the CurrentCellEndEdit event as shown below,

Code Example:

public MainWindow()

        {

            InitializeComponent();           

            this.datagrid.CurrentCellEndEdit += datagrid_CurrentCellEndEdit;

        }


        void datagrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs args)

        {

            var currentRowIndex = args.RowColumnIndex.RowIndex;

            var rowData = this.datagrid.GetRecordAtRowIndex(currentRowIndex + 1);

            (rowData as BusinessObjects).EmployeeName = "Peter";
        }


Find the sample from the below location:

Sample Link: http://www.syncfusion.com/downloads/support/forum/120488/ze/SfDataGridDemo1495473568.zip

Kindly let us know if you require any further assistance.

Regards,
Jayapradha

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;