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.

update row on SaveCellinfo . .

Thread ID:

Created:

Updated:

Platform:

Replies:

40598 Feb 7,2006 10:57 PM Feb 23,2006 12:03 AM Windows Forms 7
loading
Tags: GridControl
Adam K.
Asked On February 7, 2006 10:57 PM

If i want to refresh an entire row due to a user changing a cell where do i put the refresh range. do i put it in the SaveCellInfo Event. For example should my code look like this: (if the user changes any cell in row 3 i want the whole row to refresh . . private void gridControl1_SaveCellInfo(object sender,Syncfusion.Windows.Forms.Grid.GridSaveCellInfoEventArgs e) { if(e.RowIndex > 0 && e.ColIndex > 0) { this.dt.Rows[e.RowIndex -1][e.ColIndex -1] = e.Style.CellValue; e.Handled = true; if (e.RowIndex == 3) gridControl.RefreshRange(etc . . ) } }

stanleyj [Syncfusion]
Replied On February 8, 2006 03:51 AM

Hi Adam, private void gridControl1_SaveCellInfo(object sender,Syncfusion.Windows.Forms.Grid.GridSaveCellInfoEventArgs e) { if(e.RowIndex > 0 && e.ColIndex > 0) { this.dt.Rows[e.RowIndex -1][e.ColIndex -1] = e.Style.CellValue; e.Handled = true; //if (e.RowIndex == 3) //gridControl.RefreshRange(etc . . ) } } Such codes are not necessary there. Please let us know what you would like to do to the values of row 3 after editing. In other words what problem are you facing without those codes in the SaveCellInfo. Best regards, Stanley

Administrator [Syncfusion]
Replied On February 8, 2006 11:32 PM

i want to find out the recommended way of having an entire row refresh when a user changes a cell within that row. . thks, ak >Hi Adam, > >private void gridControl1_SaveCellInfo(object sender,Syncfusion.Windows.Forms.Grid.GridSaveCellInfoEventArgs e) >{ >if(e.RowIndex > 0 && e.ColIndex > 0) >{ >this.dt.Rows[e.RowIndex -1][e.ColIndex -1] = e.Style.CellValue; >e.Handled = true; >//if (e.RowIndex == 3) >//gridControl.RefreshRange(etc . . ) >} >} > > >Such codes are not necessary there. Please let us know what you would like to do to the values of row 3 after editing. In other words what problem are you facing without those codes in the SaveCellInfo. > >Best regards, >Stanley

Administrator [Syncfusion]
Replied On February 9, 2006 07:16 AM

Hi Adam, If you want to call the refresh range when the user changes the data then use the following code snippet bool flag; private void gridControl1_CurrentCellEditingComplete(object sender, EventArgs e) { if(flag) { this.gridControl1.RefreshRange(GridRangeInfo.Row(this.gridControl1.CurrentCell.RowIndex)); flag = false; } } private void gridControl1_CurrentCellChanging(object sender, System.ComponentModel.CancelEventArgs e) { flag = true; } Refer to this sample for details Regards, Madhan

Administrator [Syncfusion]
Replied On February 9, 2006 07:15 PM

why is this better than calling the refresh range in the SaveCellInfo event . .?? thks, ak >Hi Adam, > > If you want to call the refresh range when the user changes the data then use the following code snippet > > bool flag; > private void gridControl1_CurrentCellEditingComplete(object sender, EventArgs e) > { > if(flag) > { > this.gridControl1.RefreshRange(GridRangeInfo.Row(this.gridControl1.CurrentCell.RowIndex)); > flag = false; > } > } > private void gridControl1_CurrentCellChanging(object sender, System.ComponentModel.CancelEventArgs e) > { > flag = true; > } > >Refer to this sample for details > >Regards, >Madhan

Administrator [Syncfusion]
Replied On February 10, 2006 06:34 AM

Hi, The savecellinfo event is fired everytime you change the Style of the Object (like Changing the Color,etc ). But , the currentCellCompleteChanges Fires only changes in the Cell text, and this event matches this scenario. I hope you have a clear idea of this. Regards, Madhan.

Hui Zhong
Replied On February 22, 2006 04:52 PM

I tried CurrentCellEditingComplete event, however, if it''s a checkbox cell, you have to move the cursor after you click to check/uncheck to have the CurrentCellEditingComplete event to be raised. Click the cell will not raise the CurrentCellEditingComplete event. >Hi, > > The savecellinfo event is fired everytime you change the Style of the Object (like Changing the Color,etc ). But , the currentCellCompleteChanges Fires only changes in the Cell text, and this event matches this scenario. I hope you have a clear idea of this. > >Regards, >Madhan.

Administrator [Syncfusion]
Replied On February 23, 2006 12:03 AM

Hi Hui, The CurrentCellEditingComplete event will be triggered only when the control focus leaves the cell / grid and this is by design. If you want to check the changes in the checkbox ( check / uncheck ) there is a CheckBoxClick event. The CurrentCellChanged event can also be used but, it will be raised for the changes in all types of cells. Best Regards, Madhan.

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.

;