Datagrid woes...

LostProgrammer

Well-known member
Joined
Jan 17, 2003
Messages
123
Here is my problem, I have a dataset with a datetime column in it. I create a form with a textbox, a datagrid and a button. When the button is pushed it populates the textbox with the first datetime in the dataset and the datagrid is populated from the dataset.

So what happens is the Textbox text changes to somthing like this:

11/23/02 10:53 AM

The datagrid column for the same data populates like this:

11/23/02

My question is how do I make my datagrid show the entire length of the time. I want it to show what the textbox shows. The purpose of this program is to verify login and logout times. As of right now the datagrid is worthless to me, I am really lost on this one. Can anyone throw me a line?

Thanks so much

LP
 
Have you tried resizing the DataGrid column to see if the data is there but not visible? A DataGrid Column defaults to a certain size and will not automatically resize to accomodate data that is longer than the Column.

If this does not solve your problem, post your code and we will try to help you figure out what is going wrong.

--Sean
 
Well, I derived that my problem was in the autogeneratecolumns being false. Once I set that to true, it did what it was supposed to

However, another question: Now it wont let me reset the headertext for the columns. I have tried Columns(0).Headertext, which returns an out of range error, and Columns("UserID").Headertext, which returns a "Wrong Format"

In the HTML I dont list any columns, in order to have the fill command create them.

So, what am I doing wrong?
 
Back
Top