Results 1 to 2 of 2

Thread: Data Grid Question

  1. #1

    Thread Starter
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196

    Data Grid Question

    Hi, I have a data bound grid that is using a custom tablestyle. When the User adds a new record to my grid, I need to display a default date value in one of the cells in the addnew line of the grid. ie the add new row of the grid gets focus and a cell in that row automatically getts filled with a date.
    "And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
    Frank Zappa

  2. #2

    Thread Starter
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    erm got it I thinks

    Code:
    Private Sub grdDetail_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdDetail.CurrentCellChanged
                If Me.grdDetail(Me.grdDetail.CurrentRowIndex, 1).ToString() = "" Then
                    grdDetail(Me.grdDetail.CurrentRowIndex, 1) = Me.txtDefaultDate.Text
                End If
            End Sub
    "And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
    Frank Zappa

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