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.

Gridcontrol - RowEvents

Thread ID:

Created:

Updated:

Platform:

Replies:

44132 May 15,2006 08:11 AM May 16,2006 03:12 AM Windows Forms 5
loading
Tags: GridControl
Ravichandran
Asked On May 15, 2006 08:11 AM

Hi, Is there any event which will be fired once we move from one row to next row or some other row in GRIDCONTROL not in BoundGrid Control.? There are row related events but those are for Range of Rows only. Thanks & Regards RAvi

Administrator [Syncfusion]
Replied On May 15, 2006 08:32 AM

Hi Ravi, Please refer to the below forum thread. http://www.syncfusion.com/Support/forums/message.aspx?MessageID=43807 Let us know if you need any further assistance. Regards, Calvin.

Ravichandran
Replied On May 15, 2006 09:30 AM

Hi Calvin, Fine. But I am getting an exception in paint event if i move from one row to other. But not getting this exception frequently. pls have a look of my code private void EditableGrid_CurrentCellMoving(object sender, GridCurrentCellMovingEventArgs e) { GridCurrentCell currentCell =this.CurrentCell; if(currentCell.RowIndex != e.RowIndex) { if(m_document.IsDirty) { if ( RowChanged != null ) { m_document.IsDirty = false; RowChanged(currentCell.RowIndex-1); } } } } and also written some code in private void EditableGrid_SaveCellInfo(object sender, GridSaveCellInfoEventArgs e) { GridCurrentCell currentCell =this.CurrentCell; //currentCell.BeginEdit(); if (e.RowIndex > 0 ) { int row = e.RowIndex-1; if (m_document[row, e.ColIndex] != e.Style.CellValue) { m_document[row, e.ColIndex] = e.Style.CellValue; m_document.IsDirty = true; } e.Handled = true; } //currentCell.EndEdit(); } Regards Ravi >Hi Ravi, > >Please refer to the below forum thread. > >http://www.syncfusion.com/Support/forums/message.aspx?MessageID=43807 > >Let us know if you need any further assistance. > >Regards, >Calvin.

Administrator [Syncfusion]
Replied On May 15, 2006 09:56 AM

Hi Ravi, Have a check that the row index must be greater than -1 in the CurrentCellMoving event handler to see if that avoids the mentioned paint issue. private void EditableGrid_CurrentCellMoving(object sender, GridCurrentCellMovingEventArgs e) { if(e.RowIndex > -1) { GridCurrentCell currentCell =this.CurrentCell; if(currentCell.RowIndex != e.RowIndex) { if(m_document.IsDirty) { if ( RowChanged != null ) { m_document.IsDirty = false; RowChanged(currentCell.RowIndex-1); } } } } } Regards, Calvin.

Ravichandran
Replied On May 15, 2006 10:08 AM

Hi Calvin, No. It didnt solve the issue. Pls refer the exception below. -------------------------------------------- Object reference not set to an instance of an object. at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ----------------------------- Regds Ravi >Hi Ravi, > >Have a check that the row index must be greater than -1 in the CurrentCellMoving event handler to see if that avoids the mentioned paint issue. > > >private void EditableGrid_CurrentCellMoving(object sender, GridCurrentCellMovingEventArgs e) >{ >if(e.RowIndex > -1) >{ >GridCurrentCell currentCell =this.CurrentCell; > >if(currentCell.RowIndex != e.RowIndex) >{ >if(m_document.IsDirty) >{ >if ( RowChanged != null ) >{ >m_document.IsDirty = false; >RowChanged(currentCell.RowIndex-1); >} >} >} >} > >} > >Regards, >Calvin.

Administrator [Syncfusion]
Replied On May 16, 2006 03:12 AM

Hi Ravi, Sorry, I am not able to reproduce the issue here. Can you set Break into the debugger when the exception is thrown and find exactly where the exception is being thrown? Or if you can reproduce the issue in the sample in the above mentioned forum thread and send it back we can get back soon with a solution. Regards, Calvin.

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.

;