vb.net - How to do textChanged event in datagridview? -
I am correcting the text change event for my datagrid view but I was not able to get that result, Whom i wanted. Whenever DataGridView1 should filter content Detagreed View2 I change the text on your cell / S I
It can filter the contents of my Detagreed View2, but before me outside Detagris cursor Click here / press Tab Here is my code:
Private sub-DataGridView1_CellEndEdit (ByVal handles DataGridView1.CellEndEdit as the object, byVal e System.Windows.Forms.DataGridViewCellEventArgs). Con1 form OleDbConnection = thief con1.Open () as DT A. New DataTable Dim OleDbCommand = New OleDbCommand as _command dim () _command.Connection = con1 _command.CommandText = & amp "TABLE_NAME choose where *"; Such as content end; "" Dt.Load (_command.ExecuteReader) Me.dgv.DataSource = DT con1.Close () End Sub
"likecontent" is where I store text on my dataGridView1.
Will my dataGridView2 be updated just by textChanged like the event from my dataGridView1?
You must use CellValueChangedEvent
and CurrentCellDirtyStateChanged
Events for this Personal sub dgv_CellValueChanged (as the object handles, as the E-DataGridViewCellEventArgs) handles DGV.
Comments
Post a Comment