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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Active Cell and CellClick Event

Thread ID:

Created:

Updated:

Platform:

Replies:

48775 Sep 4,2006 03:50 PM UTC Sep 5,2006 05:59 AM UTC WinForms 1
loading
Tags: GridControl
John Slater
Asked On September 4, 2006 03:50 PM UTC

I''m having an active cell issue when a GDBG has a controls other then a Textbox. I have a CellClick event handler so I can perform validation before fields can be edited. In the event handler I am doing the following:

GridDataBoundGrid grid = (GridDataBoundGrid) sender;
GridModelDataBinder binder = grid.Binder;
GridCurrentCell cc = grid.CurrentCell;
int colIndex = grid.CurrentCell.ColIndex;
int rowIndex = grid.CurrentCell.RowIndex;
int field = binder.ColIndexToField(colIndex);
GridBoundColumn column = binder.InternalColumns[field];
string colName = column.MappingName;

It appears the MonthCalendar CellType does not become active (The cell I was last on is returned), when the eventhandler fires, unless I select the cell by tabbing to it first. A checkbox celltype has the same issue.

Administrator [Syncfusion]
Replied On September 5, 2006 05:59 AM UTC

Hi JMS,

If you set the property ActivateCurrentCellBehavior to ClickOnCell then the cell gets activated after clicking on it. If you click the dropdown button of the cell ( like ComboBox button , MonthCalender button , push button ,etc), it doesn''t activate the cell in a grid. To activate the current cell in checkbox click/cellclick event , you need to use the CurrentCell.MoveTo method.

this.grid.CurrentCell.MoveTo(e.Inner.RowIndex,e.Inner.ColIndex,GridSetCurrentCellOptions.SetFocus);

If you want to validate the cell in a gird, you can handle the validating event. Please refer the below link for more details.

KB Link : http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=340

Regards,
Haneef

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.

Warning Icon 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.Close Icon

;