Results 1 to 3 of 3

Thread: Event that would fire when editing existing values from a datagrid

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    145

    Event that would fire when editing existing values from a datagrid

    Hi all,

    Is there an event that would be fired when editing existing values from a datagrid?

    I've searched but it seems that I couldn't find one.

    Thanks,
    Marivic

  2. #2
    Junior Member
    Join Date
    Nov 2002
    Location
    New York
    Posts
    29
    The Edit event, but it is not fired by the datagrid, but by the DataGridTextBoxColumn for each column. You can create a derived class from that, use it and override the edit event:

    Protected Overrides Overloads Sub Edit( _
    ByVal source As CurrencyManager, _
    ByVal rowNum As Integer, _
    ByVal bounds As Rectangle, _
    ByVal readOnly As Boolean, _
    ByVal instantText As String, _
    ByVal cellIsVisible As Boolean _
    )
    ...-> here you can put your code that runs before the edit can take place...
    MyBase.Edit(...)
    End Sub

    You can even set event handlers on the TextBox itself (the one that is given by DataGridTextBoxColumn.Textbox) and handle anythhing there...

  3. #3
    New Member
    Join Date
    Sep 2003
    Posts
    1
    and.... what about a boolean column? is there any way to cacth the check/unckech event for the checkbox control?
    -----------
    Larrysoft

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width