How do i identify the Value change of a Datagrid column?

  • Thread starter Thread starter Reny J Joseph Thuthikattu
  • Start date Start date
R

Reny J Joseph Thuthikattu

Hi,
I want to do some validation on the Value change of a Datagrid column.Can
any one tell how do i do it?
Regards
Reny
 
Hi,

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

Add Tablestyle
http://msdn.microsoft.com/library/d...tingwindowsformsdatagridvisualbasicprimer.asp

http://msdn.microsoft.com/library/d...ry/en-us/dnwinforms/html/wnf_custdatagrid.asp

Add a handler to the textbox validating event


Dim colDescription As New DatagridTextboxcolumn

With colDescription

..MappingName = "Notes"

..HeaderText = "Notes"

..Width = 350

End With

AddHandler colDescription.TextBox.Validating, AddressOf CellValidating



Private Sub CellValidating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs)

Debug.WriteLine(DirectCast(sender, DataGridTextBox).Text)

End Sub


Ken

------------------------
"Reny J Joseph Thuthikattu" <renyatbxtechdotcom> wrote in message
Hi,
I want to do some validation on the Value change of a Datagrid column.Can
any one tell how do i do it?
Regards
Reny
 
Mike,

I am glad that you make this mistake as well, I think more than a year ago I
gave this answer as well and than I got the only answer from Ken something
as.

"Does not work with a datagrid"

You cannot add a handler to the cells in a datagrid to write something more
than he did.

Or do you have some code.

:-).

Cor
 
You can develop a your own DataGridTextBoxColumn inherited from
DataGridTextBoxColumn to do whatever you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top