all groups > vb.net controls > january 2005 >
You're in the

vb.net controls

group:

How to catch the cell content change event?


Re: How to catch the cell content change event? Ken Tucker [MVP]
1/31/2005 7:43:29 AM
vb.net controls:
Hi,

First add a tablestyle to the datagrid then I would add a handler to
the datagridtextboxcolumns textbox textchanged event.

Add Tablestyle
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchformattingwindowsformsdatagridvisualbasicprimer.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/wnf_custdatagrid.asp

Add a handler to textchanged event

Dim colName As New DataGridTextBoxColumn

With colName

..MappingName = "LastName"

..HeaderText = "Name"

..Width = 100

End With

AddHandler colName.TextBox.TextChanged, AddressOf TextBox_TextChanged



Private Sub TextBox_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs)

Debug.WriteLine("Text changed")

End Sub



Ken

------------------------
[quoted text, click to view]
Hi all,

I want to capture the cell content change event in data grid, just like
TextChanged event in Textbox control. Anyone know how to do it? Thanks

Best Rdgs
Ellis


How to catch the cell content change event? Ellis Yu
1/31/2005 6:45:20 PM
Hi all,

I want to capture the cell content change event in data grid, just like
TextChanged event in Textbox control. Anyone know how to do it? Thanks

Best Rdgs
Ellis

AddThis Social Bookmark Button