Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Datagridview cell Textchange Event Problem
 

Datagridview cell Textchange Event Problem

Please Help me,
I have a problem when i am using datagridview cell txt change event. if first cell event fires then everythings
ok. but if 2nd or 3rd etc.. cell event firing then it repete the cell number of times. How to avoid the repeat of event firing in cell txt change event?
Ajaidass  Friday, October 17, 2008 4:34 AM

Hi Ajaidass

I want to know what’s the meaning of “cell txt change event�in your post. DataGridView doesn’t has such event. Did you add your custom event to the DataGridView? Please give me more information about that. Thank you!

Sincerely,

Kira Qian

Kira Qian  Monday, October 20, 2008 5:49 AM
Hai Kira Qian,
Yes you are correct it is my custom event

my code is ------------

AddHandler Dg.EditingControl.TextChanged, AddressOf Dg_TextChanged

Private Sub Dg_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.TextChanged
Dim x as string

End Sub
Ajaidass  Saturday, October 25, 2008 4:01 AM

Hi

If you want to disable your event sometime, you can use

RemoveHandler Dg.EditingControl.TextChanged, AddressOf Dg_TextChanged

To remove the method that have been handled by this event. So when this event fired, the method won’t be called.

Please tell me if this is what you want.

Sincerely,

Kira Qian

Kira Qian  Monday, October 27, 2008 2:53 AM

You can use google to search for other answers

Custom Search

More Threads

• datagridviewcomboboxcell value is not valid
• Updating an access database (mdb file) using datagridview
• export data
• Data Grid View Control Row Headers and Column Headers in Visual Studio 2005 C# DotNet
• Transactions with dataset connections
• Opening Panel in new window
• DataGridView & static background
• Extremely Slow Population of a DataGridView
• DataGridView celll into DataGridViewComboBoxCell
• DataGrid - user edits