DataGridView中不显示错误图标或错误的文字? [英] DatagridView Not Displaying the error icon or error text?

查看:142
本文介绍了DataGridView中不显示错误图标或错误的文字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个双赢的形式(C#)有一个DataGridView。我网格的数据源设置为一个DataTable。

I have a win form (c#) with a datagridview. I set the grid's datasource to a datatable.

用户想检查是否在另一个源存在于数据表中的一些数据,所以我们在表圈比较行的其他源和对数据表的rowerror设置为短消息。在DataGridView没有显示这些错误。在datagridviewrows的ERRORTEXT被设置,但显示任何错误。

The user wants to check if some data in the datatable exists in another source, so we loop through the table comparing rows to the other source and set the rowerror on the datatable to a short message. The datagridview is not showing these errors. The errortext on the datagridviewrows are set, but no error displayed.

我只是期望太多错误显示,他们只在编辑数据的情况下显示在网格?

Am I just expecting too much for the errors to show and they only show in the context of editing the data in the grid?

我已经与这摆弄了一天搜索有人发布了一个simalar问题无济于事! - 帮

I have been tinkering with this for a day and searched for someone that has posted a simalar issue to no avail - help!

推荐答案

这是一个有点晚了原来的海报,但在这里有什么解决它,我...

This is a bit late for the original poster, but here what solved it for me...

检查行高度即可。如果是小于 19 它不会绘制图标。尝试设置它高一点,看看如果多数民众赞成这个问题。

Check the row height. If it's less than 19 it will not draw the icon. Try setting it a bit higher to see if thats the problem.

grid.RowTemplate.Height = 22

这篇关于DataGridView中不显示错误图标或错误的文字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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