首页 > 解决方案 > VB - DataGridView Hour column shows as decimal and Update DataGridView

问题描述

I'm having a problem. I inserted data to a datagridview through the properties of it , through databindings as shown : DataBindings

And the database is from a access which is connected to an excel. Now I would ask for all your expertise about this issue:

Can someone help me please? Thank you in advance. Kind Regards

标签: databasevb.netms-accessdatagridviewdatagrid

解决方案


您需要以编程方式或通过 gui 将列添加到 DataGridView(右键单击 DGV、编辑列、添加...)。请记住将 DataPropertyname 设置为数据库输入中的列名。在这里你有 DefaultCellStyle 属性,在你进入它的细节之后有Format属性。选择“日期时间”格式类型或设置您的自定义格式,即“00:00”。 编辑列对话框

顺便说一句,如果您有两个非常不同的问题,请您将它们放在单独的线程中。此外,要回答您有关更新的问题,社区当然需要查看您正在使用的代码。


推荐阅读