|
-
Aug 20th, 2003, 06:40 PM
#1
Thread Starter
Addicted Member
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
-
Aug 20th, 2003, 08:14 PM
#2
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|