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.

CurrentCellActivated event is not firing.

Thread ID:

Created:

Updated:

Platform:

Replies:

109447 Jun 13,2013 09:12 AM Jul 1,2013 04:44 AM WPF 1
loading
Tags: GridControl
Jyoti Joon
Asked On June 13, 2013 09:12 AM

    Hi,

I am facing a problem which is described below:

      I have four levels of nested Grids with templated columns. I am trying to edit a cell while tabbing, the cell is getting selected but it doesn’t allow to edit the cell until I click it.

To solve this problem I am handling “CurrentCellActivated” event, it is firing and working fine for the parent grid selected cell but not firing for its child grid while tabbing. Please let me know how to resolve the issue.

 

Thanks,

Jyoti

 


Divya A [Syncfusion]
Replied On July 1, 2013 04:44 AM

Hi Jyoti,


The CurrentCellActivated event has to be invoked for each ChildModel, the ChildModels can be obtained and the corresponding CurrentCellActivated event can be invoked from the RecordExpanded event.


Code Snippet:

   this.dataGrid1.ModelLoaded += new EventHandler(dataGrid1_ModelLoaded);

 

    void dataGrid1_ModelLoaded(object sender, EventArgs e)

    {

       this.dataGrid1.Model.Table.RecordExpanded += 

                            new EventHandler<GridDataValueEventArgs<GridDataRecord>>(Table_RecordExpanded);

    }

 

    void Table_RecordExpanded(object sender, GridDataValueEventArgs<GridDataRecord> e)

    {

 

       dataGrid1.Dispatcher.BeginInvoke(new Action(() =>

       {

          e.Value.ChildModels[0].Grid.CurrentCellActivated += 

                   new Syncfusion.Windows.ComponentModel.GridRoutedEventHandler(grid_CurrentCellActivated);

       }), DispatcherPriority.ApplicationIdle);

 

       e.Value.ChildModels[0].Table.RecordExpanded += 

                             new EventHandler<GridDataValueEventArgs<GridDataRecord>>(Table_RecordExpanded);

 

    }


We have prepared a sample and attached it in the following location.


Sample: HierarchicalGridDemo.zip


Regards,

Divya.


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.

;