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

excel like behavior -- possible?

Thread ID:

Created:

Updated:

Platform:

Replies:

21598 Nov 15,2004 08:42 PM UTC Dec 20,2004 11:36 AM UTC WinForms 6
loading
Tags: GridControl
Cathy Noakes
Asked On November 15, 2004 08:42 PM UTC

In Excel there is a feature where you can select a cell and position the cursor over the bottom right corner; the cursor shape changes to a plus sign and I can click and drag and copy the value in the selected cell to a range of cells. Is this possible with EssentialGrid (currently we are using version 2.1.0.9). Thanks for the info, Cathy

Administrator [Syncfusion]
Replied On November 15, 2004 09:19 PM UTC

The \Syncfusion\Essential Suite\2.1.0.9\Grid\Samples\In Depth\ExcelSelectionMarker sample has a custom mousecontroller that handles the selection dragging part of this process. You can copy it to your project and get the drag behavior. The sample controller just gives you the expanded range, but you could add code to copy the original cell to the newly expanded range,

Cathy Noakes
Replied On November 19, 2004 07:17 PM UTC

Clay, Thanks for the help. I have it mostly working the way I want it to, but sometimes after I have successfully selected a cell and dragged once. I select another cell and the drag does not work. In debugging, I can see that when it gets into the MouseMove method the dragWindow is undefined, as if the MouseDown method was never called. Does this ring any bells with you? When running the sample I cannot get it to break. Any ideas? Thanks again, Cathy

Administrator [Syncfusion]
Replied On November 19, 2004 10:05 PM UTC

Just something to try to see if it has any effect on this problem. Set grid.ActivateCurrentCellBehavior = GridCellActivateAction.DblClickOnCell;

jeaning
Replied On December 13, 2004 03:34 PM UTC

Hi, I have a question about ActiveCurrentCellBehavior. In my GridDataBindGrid, there are four columns. Column one is editable, I want the cursor change to "I", Column two can be editable if Column Four is true. Column Three and Column four are not editable at all so that I want the sursor is Arrow. I use CurrentCellActived event to set ActiveCurrentCellBehavior either to "SetCurrent" or "None". If I use keyboard to edit and access the cells in the same row one after another, the effect seems to be a columns delay. I am not sure which event is the best for my senario. Thanks, jeaning >Just something to try to see if it has any effect on this problem. > >Set > >grid.ActivateCurrentCellBehavior = GridCellActivateAction.DblClickOnCell; >

Administrator [Syncfusion]
Replied On December 13, 2004 09:21 PM UTC

One way you can do this is to set and leave this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SetCurrent;. Then handle the CurrentCellStartEditingt event and cancel it if the current cell is in a row and column you do not want to edit.
private void gridControl1_CurrentCellStartEditing(object sender, CancelEventArgs e)
{
	GridCurrentCell cc = this.gridControl1.CurrentCell;
	if(cc.ColIndex > 2 || (cc.ColIndex == 2 && this.gridControl1[cc.RowIndex, 4].Text != "1"))
	{
		e.Cancel = true;
	}
}

Administrator [Syncfusion]
Replied On December 20, 2004 11:36 AM UTC

It works so well.Thanks jeaning >One way you can do this is to set and leave this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SetCurrent;. > >Then handle the CurrentCellStartEditingt event and cancel it if the current cell is in a row and column you do not want to edit. >
>private void gridControl1_CurrentCellStartEditing(object sender, CancelEventArgs e)
>{
>	GridCurrentCell cc = this.gridControl1.CurrentCell;
>	if(cc.ColIndex > 2 || (cc.ColIndex == 2 && this.gridControl1[cc.RowIndex, 4].Text != "1"))
>	{
>		e.Cancel = true;
>	}
>}
>

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

;