Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 problems

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm not sure if anyone came across the same problems in Windows Forms, but if you can tell me how to solve these, thanks in advance!

1. DataGrid - DateTime
Whenever the DataGrid control displays a field of type DateTime, only the date (such as 6/18/02) is displayed, not the time. Of course the DateTime could be converted to a string, but the problem is that then it is impossible to sort the column with the DateTime values when the column header is clicked on.
2. Form.DesktopLocation
For some reason, whenever I do MyForm.DesktopLocation=new Point(...) or MyForm.SetDesktopLocation(...), the desktop location is not affected at all. I tried this several times on different forms, but it never worked.

Thank you!
 
1) I don't use data controls, so I can't help you there.

2) When are you setting the DesktopLocation property? You might not be able to change it in the InitializeComponent section. You should be able to change it in the OnLoad event. Is this a MDI parent or child window?

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top