|
-
Jul 5th, 2002, 04:12 PM
#1
Datagrid / DateTime value problem
I have a datagrid with lots of data. Some columns are datetime fields. I had to add a DataGrid Table Style in order to see the time as well as the date. That works fine.
Now, I see the date and time combo in the field but when I do something like MsgBox(DataGrid1.Item(1, 2)) to grab the value it strips out the time portion of the value. That's just test code, but you get the idea.
In case you're wondering what I'm trying to do: I have a loop that goes through each column and each row and determines how wide the column should be in the Grid by using MeasureString. This would work just fine except when I try to get the string out of the date/time fields it's returning a shorter value (without a date) than it shows in the grid. So, the MeasureString method comes up with an autosize value for the field width that's way too small.
Any ideas ?
Thanks,
Eric
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
|