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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

fire row changed event

Thread ID:

Created:

Updated:

Platform:

Replies:

30097 Jun 10,2005 02:58 PM UTC Jun 13,2005 05:35 PM UTC WinForms 6
loading
Tags: GridControl
Lan Mo
Asked On June 10, 2005 02:58 PM UTC

I try to fire a event whenever the GGC row changed. I tried following code, it fired the event when row changed, but it also fired event when I click in different cell in the same row. I only want fire event when row changes. Any help? private void gdBase_CurrentRecordContextChange(object sender, Syncfusion.Grouping.CurrentRecordContextChangeEventArgs e) { if (e.Action==CurrentRecordAction.EnterRecordComplete) { if (this.gdBase.Table.CurrentRecord!= null) { Record rec = this.gdBase.Table.CurrentRecord ; DataRowView drv = rec.GetData() as DataRowView; GridRowChanged(drv); // fire my event to send the current row data } } }

Administrator [Syncfusion]
Replied On June 10, 2005 03:57 PM UTC

I think CurrentRecordContextChange is teh proper event to use. It is hit quite often, but for me the only time e.Action is LeaveRecordComplete is when you actually move off the current record. Here is the code in 3.2.1.0 that I used to show this.

private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
	if(e.Action == CurrentRecordAction.LeaveRecordComplete)
	{
		Console.WriteLine(e.Action);
	}
}
Here is a sample. I might be missing something, but for me, the only time something appears in the output window is when you leave the record. Do you see something different? http://www.syncfusion.com/Support/user/uploads/GGC_ExpressionField_e5c0ccaa.zip

Lan Mo
Replied On June 10, 2005 06:19 PM UTC

Your sample works well and that is what I want. I copied your code, it doesn''t work on my GGC. I guess there are some property settings may affect the event behavior. >I think CurrentRecordContextChange is teh proper event to use. It is hit quite often, but for me the only time e.Action is LeaveRecordComplete is when you actually move off the current record. > >Here is the code in 3.2.1.0 that I used to show this. >
>
>private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
>{
>	if(e.Action == CurrentRecordAction.LeaveRecordComplete)
>	{
>		Console.WriteLine(e.Action);
>	}
>}
>
> >Here is a sample. I might be missing something, but for me, the only time something appears in the output window is when you leave the record. Do you see something different? > > >http://www.syncfusion.com/Support/user/uploads/GGC_ExpressionField_e5c0ccaa.zip > >

Administrator [Syncfusion]
Replied On June 10, 2005 06:25 PM UTC

What other events are you handling? You might comment these out to see if they are affecting this behavior. Do you see any exceptions being listed in your putput window?

Lan Mo
Replied On June 10, 2005 06:57 PM UTC

I commented all event related to GGC. It doesn''t work either. No exception occured. I attached the form files here. Thanks, >What other events are you handling? You might comment these out to see if they are affecting this behavior. > >Do you see any exceptions being listed in your putput window? frmGrid_5457.zip

Administrator [Syncfusion]
Replied On June 11, 2005 12:10 AM UTC

I did not spot anything in your code. You could place a stop in that event to try to see if you can see if the call stack shows anything in your code. (It may not as the event may be an indirect consequence of something in your code.) Anothe rplace you can try to put your event is in the TableControlCurrentCellMoving event.
private void grid_TableControlCurrentCellMoving(object sender, GridTableControlCurrentCellMovingEventArgs e)
{
	GridCurrentCell cc = e.TableControl.CurrentCell;
	if(cc.MoveFromRowIndex != cc.MoveToRowIndex)
	{
		//raise your event...
	}
}

Lan Mo
Replied On June 13, 2005 05:35 PM UTC

Your code in event TableControlCurrentCellMoving works for me. Thanks, >I did not spot anything in your code. > >You could place a stop in that event to try to see if you can see if the call stack shows anything in your code. (It may not as the event may be an indirect consequence of something in your code.) > >Anothe rplace you can try to put your event is in the TableControlCurrentCellMoving event. >
>private void grid_TableControlCurrentCellMoving(object sender, GridTableControlCurrentCellMovingEventArgs e)
>{
>	GridCurrentCell cc = e.TableControl.CurrentCell;
>	if(cc.MoveFromRowIndex != cc.MoveToRowIndex)
>	{
>		//raise your event...
>	}
>}
>

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

;