User (Old forums)MemberApril 18, 2006 at 6:38 pmPost count: 23064
I am trying to display and edit columns in a sqlserver2005 datetime column using an xceed grid. I am trying to display only the time out of the table’s data. I have followed the post referenced at:
However, when I implement this code, the time columns will not display data, nor will they allow updating or adding time data. When I take the formatprovider and formatspecifier code out and just use the date picker in the grid, I can edit, and edit the columns. Does anyone have any ideas for this?
Thanks in Advance,
Imported from legacy forums. Posted by bolson (had 4001 views)User (Old forums)MemberApril 20, 2006 at 4:31 pmPost count: 23064
It is likely that you are using a WinDatePicker/DateEditor on the column, but this doesn’t support the display of time in the dropdown. Set a TextEditor as the CellEditorManager on the column, and then the FormatProvider and FormatSpecifier should work.
Imported from legacy forums. Posted by André (had 646 views)User (Old forums)MemberApril 24, 2006 at 6:16 pmPost count: 23064
Thanks so much for your reply! I changed the CellEditorManager and CellEditorViewer to TextEditor and TextViewer, respectively. That solved my display problem, however, the data is still read-only. Is there a property of the cell that I should set or something? I know this has to be something little that I am missing.
Thanks Again for your help,
Imported from legacy forums. Posted by bolson (had 385 views)User (Old forums)MemberApril 25, 2006 at 9:54 amPost count: 23064
Verify that the column ReadOnly property is set to false. Else, make sure the field from the data source is editable.
Imported from legacy forums. Posted by André (had 490 views)User (Old forums)MemberMay 8, 2006 at 12:03 pmPost count: 23064
Thanks again for your help. I still cannot get this to work correctly. If I just use the calendar dropdown in the grid, I can edit the columns just fine. However, when I start changing the formatspecifier and formatprovider, the cell an no longer be edited. I have even tried setting the readonly property to false. Here is a code snippet of what I am doing.
Dim format As New System.Globalization.DateTimeFormatInfo()
starterGrid.Columns(“openHouse_startTime”).FormatSpecifier = “t”
starterGrid.Columns(“openHouse_startTime”).FormatProvider = format
starterGrid.Columns(“openHouse_startTime”).ReadOnly = False
What am I missing? I know it has got to be something pretty small, but it is frustrating nonetheless.
Imported from legacy forums. Posted by bolson (had 338 views)
- You must be logged in to reply to this topic.