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.
Syncfusion Feedback

cursor in cell

Thread ID:

Created:

Updated:

Platform:

Replies:

62547 Jun 18,2007 01:50 PM UTC Jun 26,2007 12:08 PM UTC Windows Forms 4
loading
Tags: GridControl
sdfs
Asked On June 18, 2007 01:50 PM UTC

I want to make a cell editable in grid, having cursor blinking in it.
I made celltype = textbox.
but I want the exactly the same behaviour of cell, when we click in the cell, i.e a cursor blinking in it.

thanks in advance for help

haneefm [Syncfusion]
Replied On June 18, 2007 03:20 PM UTC

Hi Ali,

You can try setting

[c#]
this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SetCurrent;

This will make sure the current cell gets activated as you cursor into the cell. This happens by default when you click on a cell.

Best regards,
Haneef

sdfs
Replied On June 19, 2007 08:37 AM UTC

thanks for reply, but my issue is still there.
let me explain you bit further.
have look at code below

private void btnAdd_Click(object sender, EventArgs e)
{
this.grdCurrency.Refresh();
this.grdCurrency.RowCount += 1;
this.grdCurrency[this.grdCurrency.RowCount, 1].CellType = GridCellTypeName.TextBox;
this.grdCurrency.CurrentCell.MoveTo(this.grdCurrency.RowCount, 1);
//this.grdCurrency.ActivateCurrentCellBehavior = GridCellActivateAction.SetCurrent;
this.grdCurrency.FixCurrentCellGotFocus(true);
this.btnAdd.Enabled = false;

}
I add your line in the code it does make the newly added cell active, but no cursor is blinking in it.

secondly without your line the above code is working fine, i.e whenever user clicks on the ADD button a new row is added in grid and newly added cell becomes active, if user types some value in cell, it does appear in cell, the only problem was that there was no cursor blinking in the cell. after addition of ur code the focus is no more on the grid, rather it goes to cancel button, and i have to click on cell to enter value in it.

Note: grid has only one column.

advance thanks again for help.......

haneefm [Syncfusion]
Replied On June 19, 2007 09:08 PM UTC

Hi Ali,

Could please try these code and let me know if this helps.

private void btnAdd_Click(object sender, EventArgs e)
{
this.grdCurrency.Refresh();
this.grdCurrency.RowCount += 1;
this.grdCurrency[this.grdCurrency.RowCount, 1].CellType = GridCellTypeName.TextBox;
this.grdCurrency.Focus();
this.grdCurrency.CurrentCell.MoveTo(this.grdCurrency.RowCount, 1);
this.grdCurrency.CurrentCell.BeginEdit(true);
this.btnAdd.Enabled = false;

}

Best regards,
Haneef

sdfs
Replied On June 26, 2007 12:08 PM UTC

thanks haneef,
it is working

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

;