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.

rowEnter event

Thread ID:

Created:

Updated:

Platform:

Replies:

71359 Jan 28,2008 03:52 PM Feb 7,2008 12:29 AM Windows Forms 3
loading
Tags: GridControl
Yoni
Asked On January 28, 2008 03:52 PM

Hey,
I'm using gridDataBoundGrid.
I added to the grid some columns, and configured the dataSource of the grid.
For each column I configured its suitable mappingName (like the cols in the dataTable), except of the last column. I used modelQueryCellInfo event in order to duplicate some data from other column to it. The problem is that the rowEnter event doesn't jump when I click on a cell in the last column because I added to it unique mapping name that doesn't have any relation to the dataSource.

I need that this(rowEnter) event will jump, and no other event.

I also tried to add a column to the dataTable (dataSource) which its name is the name of the unique mappingName, but it's also doesn't help.
I don't want to configure the dataTable from beginning to have the last column, and if it is possible I don't want to add at all any additional column to the dataTable.

Can you help me ?

thanks,
Yoni


Jeba S [Syncfusion]
Replied On January 31, 2008 12:31 PM

Hi Yoni,

Sorry for the delay in response.

You can make the RowEnter to fire for the Unbound Column by handling the CurrentCellMoved. In the event handler please use the following snippets:


private void gridDataBoundGrid1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e)
{
GridDataBoundGrid grid = sender as GridDataBoundGrid;
GridCurrentCell cc = grid.CurrentCell;
if (cc.MoveToRowIndex != cc.MoveFromRowIndex)
{
int col = cc.ColIndex;
grid.CurrentCell.MoveTo(cc.RowIndex, 1);
grid.CurrentCell.MoveTo(cc.RowIndex, col);
}
}


Please refer the sample and let us know if this helps:
http://websamples.syncfusion.com/samples/Grid.Windows/F71359/main.htm

Thank you for your interest in Syncfusion Products.

Regards,
Jeba.



Yoni
Replied On January 31, 2008 03:28 PM

Hey again,
First of all, why the rowEnter event doesn't jump when I click on a gridBoundColumn that its mappingName isn't related to nothing in the dataTable ? Why do I have to register to an event that doesn't have a connection to rowEnter event ? The event have to jump by changing the row place.

Second, why when I configure new dataColumn for the dataTable with the unique mappingName of the gridBoundColumn then the rowEnter event doesn't also jump ?

Third, can you please tell me how can I insert dataColumn with the unique mappingName of the gridBoundColumn and the rowEnter event will jump ?

Thanks a lot,
Yoni


Jeba S [Syncfusion]
Replied On February 7, 2008 12:29 AM

Hi Yoni,

Reason for RowEnter event not firing for UnboundColumn with unique mappingName

Even though the unbound column is bound with a MappingName it is not related to the underlying datasource.That means there is no row releted to unboundcell.

If you want to fire the RowEnter event for unbound column then derive the GridDataBoundGrid and override the OnCurrentCellActivating method to call the RowEnter event.


GridRowEventArgs ce = new GridRowEventArgs(e.RowIndex);
this.OnRowEnter(ce);


Please check the RowIndex and call the above code for unbound column.

Kindly let us know if you need any further assistance.

Best Regards,
Jeba.



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.

;