How are you unbinding and rebinding the DataSource? I'm not real experienced with the DGV, but I'll try to help you figure it out anyway! =0) (Or someone else may have an idea)
~~Bonnie
>I am using a DGV Object, which I initially bind its DataSource to a DataTable. After binding, I run a "FormatGrid()" method which format the columns of the grid. One command I do is the following:
>
>
> If gridStudents.Columns.Contains("DOB") Then
> With gridStudents
> .Columns("DOB").HeaderText = "DOB"
> .Columns("DOB").Width = objGraphics.MeasureString("XX/XX/XXXX", objFont).Width + 15
> .Columns("DOB").DisplayIndex = 3
> .Columns("DOB").CellTemplate.Style.Format = "MM/dd/yyyy"
> End With
> End If
>
>
>Now, the above code works perfectly...the first time. But later, if I reload the data in the DataTable, which I then unbind and rebind the DataSource and call the FormatGrid() method again, the "MM/dd/yyyy" format will not apply itself. It defaults to the mormal date display.
>
>Anyone know what I am doing wrong or how to force the DGV to display the Date format as I want it to?