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

how to get whole text enetered while entering

Thread ID:

Created:

Updated:

Platform:

Replies:

87935 Jul 13,2009 10:53 AM UTC Jul 14,2009 02:15 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Ha Nguyen
Asked On July 13, 2009 10:53 AM UTC

Hi,

I am using Syncfusion Gridcontrol in my application.
.NET Framework 3.5
VS 2008

In the grid, for a cell maxlength is set 3.Cell Type is TextBox.If I have pressed three keys i.e, If I have entered three characters then, I have to move to next cell.

I tried in CurrentCellValidateString event of the grid.But,In this event, I was able to get text entered in the cell i.e.in the method, the length of the string I have entered is 3.but,in the UI, It displayed only 2 charcters and the third character is displayed in the next cell.

Kindly provide any solution for the above issue.

Thanks
Deepa



Rajadurai C [Syncfusion]
Replied On July 14, 2009 02:15 PM UTC

Hi Deepa,

Thanks for your interest in Syncfusion Products.

Please refer to the following sample in which the following code handled in CurrentCellValidateString event to achieve the expected behavior.

GridCurrentCell cc = this.gridControl1.CurrentCell;
if (cc.RowIndex > 0 && cc.ColIndex > 0)
{
if (cc.Renderer.ControlText.Length == 3)
{
if (cc.ColIndex == this.gridControl1.ColCount && cc.RowIndex < this.gridControl1.RowCount)
cc.MoveTo(cc.RowIndex + 1, 1);
else if (cc.ColIndex < this.gridControl1.ColCount)
cc.MoveTo(cc.RowIndex, cc.ColIndex + 1);
}
}


Sample:
http://files.syncfusion.com/support/samples/Grid.Windows/7.2.0.37/F87935.zip

Regards,
Rajadurai

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

;