Groups | Blog | Home
all groups > vb.net data > november 2006 >

vb.net data : datagridView in windows form 2.0 creating problem.


sathya
11/13/2006 8:57:33 PM
i am adding geeting values from popup and putting that selected value
to last row (new row) of datagridview.but when i get value from popup
the new row is not formed.So when ever i move out from this record
without savving the record the values of the record get vanish.

but when i enter the value through key board into the last row of
Datagridview a new row is automaticaly formed.ans when i move to some
other record without saving thenew record the values does not vanish.

So can anyone tell me how a new row appended when we key the values
into last row of datagridview.

2) The date format should look to the computer regional settings so USA
users see 12/25/2006 and in Finland they see 25/12/2006,how could i
achieve this.
Christer S
11/14/2006 1:10:54 PM
Try to format cell in event DatagridView.CellFormatting.

Private Sub DatagridView1_CellFormatting(ByVal sender As Object, ByVal e As
System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles
DatagridView1.CellFormatting
Select Case e.ColumnIndex

Case 1

e.CellStyle.Format = "ShortDate" (OBS! Im not sure about the
syntax for setting Windows standard format)

End Select

End Sub



[quoted text, click to view]

AddThis Social Bookmark Button