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.

How to grap the Text When Current Cell changed

Thread ID:





42650 Apr 4,2006 02:42 AM Apr 6,2006 02:12 AM Windows Forms 5
Tags: GridControl
Asked On April 4, 2006 02:42 AM

Hi, I need to capture the current cell text when the text changed, i tried this by using CellLostFocus event but it firing only when i give tab otherwise it''s fails, which event suitable to solve this problem. Regards, padmanabhan.

Administrator [Syncfusion]
Replied On April 4, 2006 03:13 AM

Hi Padmanabhan, You can use the CurrentCellChanged and CurrentCellValidateString events to capture the current cell text when the text changed is changed. Below is the code snippet. // this.gridDataBoundGrid1.CurrentCellChanged += new EventHandler(gridDataBoundGrid1_CurrentCellChanged); private void gridDataBoundGrid1_CurrentCellChanged(object sender, System.EventArgs e) { GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; Console.WriteLine("CurrentCellChanged :" + cc.Renderer.ControlText); } //this.gridDataBoundGrid1.CurrentCellValidateString += new GridCurrentCellValidateStringEventHandler(gridDataBoundGrid1_CurrentCellValidateString); private void gridDataBoundGrid1_CurrentCellValidateString(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellValidateStringEventArgs e) { GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; Console.WriteLine("CurrentCellValidateString :" + cc.Renderer.ControlText); } Best regards, Madhan

Replied On April 4, 2006 09:14 AM

Hi, Thank you for your timely help, but for the requirement purpose i am inherting the Syncfusion grid control in GetViewControl.cs here i can''t fire the event, how can i do this, give me the possible solution as early as possible pls. Thank you, Padmanabhan.

Administrator [Syncfusion]
Replied On April 5, 2006 02:42 AM

Hi Padmanabhan, You can call the OnCurrentCellChanged event in the inherited grid. Here is the code snippet protected override void OnCurrentCellChanged(System.EventArgs e) { base.OnCurrentCellChanged(e); Console.WriteLine(this.CurrentCell.Renderer.ControlText); } Best regards, Madhan

Replied On April 5, 2006 08:31 AM

Hi, This working fine for my requirement, but this event also firing when the drop down changed, it should not alow, is there any possible way. Thanking u, Regards, PADMANABHAN.

Administrator [Syncfusion]
Replied On April 6, 2006 02:12 AM

Hi Padmanabhan, You can check for the Cell Type ( this.CurrentCell.Renderer.StyleInfo.CellType == GridCellTypeName.TextBox ) in the OnCurrentCellChanged event to resolve this issue. Best regards, Madhan


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.