开发者

Set the error icon position of the DataGridViewCell

How can I change the position of the error icon in DataGridViewCell? It always appears to the right, bu开发者_运维知识库t in some cases it must be to the left of the cell.

Could someone help me?


Check out this reference page. Notice there is a Style attribute. That should help you set the horizontal alignment.


You can influence the position of the error icon by overriding the method GetErrorIconBounds of the DataGridViewCell class. But in order to use this, you must subclass the DataGridViewCell (or one of its subclasses), along with the corresponding column type; and use them in your grid, instead of the standard classes like DataGridViewTextBoxCell etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜