数据表格式 [英] DataTable Format

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

问题描述



在将数据表绑定到网格之前,是否可以根据文本值更改数据表中行的颜色?我可以更改网格中的行颜色,但是我想知道它是否可以在数据表本身中完成任何操作.如果是这样,请让我说明如何实现.

在此先感谢..

Hi,

Is it possible to change the color of a row in data table depending on text values before binding it to the grid? I can change the row color in grid but I want to know whether is there any way that it can done in data table itself. If so, please let me on how to achieve that.

Thanks in advance..

推荐答案

好,您可以在Datagrid中执行行颜色功能,因为Datagrid支持该功能.如果您查看数据网格的呈现HTML,则该表是带有定义了行样式(如果已定义)的其他html的表.
希望这可以向您解释表中固有地不支持类似的东西.

此外,尽管您可以显式地尝试向表的每一行添加样式,但是在将其绑定到网格时,它不会集成这些表行样式,因此这样做是徒劳的.您将不得不在网格中添加行样式.
Well, you are able to do the row color functionality in Datagrid as it is supported by Datagrid. If you have a look at the rendered HTML of a datagrid, it is a table with additional html defining the style of rows if defined.
Hope this explains you that the similar thing is not supported inherintly in Tables.

Further, though you can explicitly try to add style to each row of table but while binding it to a grid, it would not integrate those table row sytles and thus it would be futile to do so. You will have to go and add row styles in grid.


也许
Maybe this post can help.


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

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