datagrid数据转换 [英] datagrid data conversion

查看:49
本文介绍了datagrid数据转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个数据网格列出来自数据库的数据,我从

数据库中得到实际值(它实际上是代表总共几分钟。


我想要做的是将该数字转换为总计小时和分钟

像这样:
数据库上
:70,5
数据网格上的
:01:10:3​​0

如何进行转换?

Hi,

I have a datagrid listing data from a database, and I am getting from the
database real value (it''s actually represents a total of minutes).

What I want to do is Convert that number to a total of hours and minutes
like this:
on database: 70,5
on datagrid: 01:10:30

How can I do that conversion?

推荐答案

你必须应用DataGridTableStyle,然后是DataGridColumnStyle,

你可以从那里格式化列。
http://www.knowdotnet.com/articles/cgrid.html应该帮助你。

Diogo Alves - 软件开发人员

< Di ****************** *******@discussions.microsoft .com>在消息中写道

新闻:C6 ********************************** @ microsof t.com ...
You''ll have to apply a DataGridTableStyle and then a DataGridColumnStyle,
you can format the column from there.
http://www.knowdotnet.com/articles/cgrid.html should help you.
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:C6**********************************@microsof t.com...


我有一个数据网格列出来自数据库的数据,我从
数据库获得实际价值(它''这实际上代表了总共几分钟。

我想要做的是将该数字转换为总计小时和分钟
这样:
数据库:70, 5
关于datagrid:01:10:3​​0

如何进行转换?
Hi,

I have a datagrid listing data from a database, and I am getting from the
database real value (it''s actually represents a total of minutes).

What I want to do is Convert that number to a total of hours and minutes
like this:
on database: 70,5
on datagrid: 01:10:30

How can I do that conversion?



你''我必须应用DataGridTableStyle然后应用DataGridColumnStyle,

你可以从那里格式化列。
http://www.knowdotnet.com/articles/cgrid.html 应该可以帮到你。

" Diogo Alves - Software开发人员

< Di ************************* @ discussion.microsoft .com>在消息中写道

新闻:C6 ********************************** @ microsof t.com ...
You''ll have to apply a DataGridTableStyle and then a DataGridColumnStyle,
you can format the column from there.
http://www.knowdotnet.com/articles/cgrid.html should help you.
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:C6**********************************@microsof t.com...


我有一个数据网格列出来自数据库的数据,我从
数据库获得实际价值(它''这实际上代表了总共几分钟。

我想要做的是将该数字转换为总计小时和分钟
这样:
数据库:70, 5
关于datagrid:01:10:3​​0

如何进行转换?
Hi,

I have a datagrid listing data from a database, and I am getting from the
database real value (it''s actually represents a total of minutes).

What I want to do is Convert that number to a total of hours and minutes
like this:
on database: 70,5
on datagrid: 01:10:30

How can I do that conversion?



没有帮助很多我必须得到值并进行计算和它们

格式化结果....


" WG Ryan MVP写道:
That did not helpme to much I must get the values and do the calcs and them
format the result....

"W.G. Ryan MVP" wrote:
你必须应用DataGridTableStyle,然后是DataGridColumnStyle,
你可以从那里格式化列。
http://www.knowdotnet.com/articles/cgrid.html 应该可以帮到你。
Diogo Alves - 软件开发人员
< Di ************************* @ discussion.microsoft .com>在消息中写道
新闻:C6 ********************************** @ microsof t.com。 ..
You''ll have to apply a DataGridTableStyle and then a DataGridColumnStyle,
you can format the column from there.
http://www.knowdotnet.com/articles/cgrid.html should help you.
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:C6**********************************@microsof t.com...


我有一个数据网格列出数据库中的数据,我从
数据库实际值得到它(它实际上代表了总共几分钟。

我想要做的是将这个数字转换为总计小时和分钟
像这样:
数据库:70,5 关于datagrid:01:10:3​​0

如何进行转换?
Hi,

I have a datagrid listing data from a database, and I am getting from the
database real value (it''s actually represents a total of minutes).

What I want to do is Convert that number to a total of hours and minutes
like this:
on database: 70,5
on datagrid: 01:10:30

How can I do that conversion?




这篇关于datagrid数据转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆