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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to grap the Text When Current Cell changed

Thread ID:





42650 Apr 4,2006 06:42 AM UTC Apr 6,2006 06:12 AM UTC WinForms 5
Tags: GridControl
Asked On April 4, 2006 06:42 AM UTC

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 07:13 AM UTC

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 01:14 PM UTC

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 06:42 AM UTC

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 12:31 PM UTC

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 06:12 AM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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