DataGrid ?? [英] DataGrid??

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

问题描述

我是C#的新程序员.首先对不起,我来自英国.我来自阿根廷.

我创建了这个DataGridView.
我需要解决此错误:图片
列完成.而且我也想删除行的边框.
当我选择一行时,请选择所有的行单元格.

对不起,我的英语.我不使用翻译器. :-D

Hi, I am a new programmer of C#. First sorry mi English I am from Argentina.

I Create this DataGridView.
I need to fix this error: Picture
Columm Finish. And Also I want to remove the border of the rows.
And when I select a row, select al the rowcells.

Sorry my English. I don''t use translator. :-D

推荐答案

您必须是新用户.

首先,行选择很简单.在DataGridViewProperties中,有一个名为SelectionMode的属性.将其更改为FullRowSelect.

其次,要摆脱行边界,请将CellBorderStyle设置为None.

我不确定是否还有其他问题...但这应该可以帮助我回答两个问题.
You must be new.

First, the row selection is simple. In the Properties of the DataGridView, there is a property called SelectionMode. Change it to FullRowSelect.

Secondly, to get rid of the row borders, set CellBorderStyle to None.

I''m not sure if there was another question there or not...but that should help with the two I could answer.


如果您是C#的新手,它看起来对我来说,就像您正在为一个对您来说太复杂的项目进行工作.

我认为图片中的错误"是行没有填充网格.要解决此问题,您需要对控件进行整体测量,然后更改列的宽度,这样它们的总和就等于控件的整体大小.如果控件不调整大小,则可以在设计器的属性中进行设置,而不用编写任何代码.
If you''re new to C#, it looks to me like you''re working on a project far too complex for you.

I assume the ''error'' in the picture is that the rows do not fill the grid. To fix this, you need to measure the control as a whole, then change the widths of your columns, so they add up to the size of the control as a whole. If your control does not resize, you can set this up in the properties of the designer, and not write any code at all.


您可以将AutoSizeMode设置为Fill,以填充想要的列填充了DataGridView中的剩余可用空间.您不需要自己计算空间.
You can set AutoSizeMode to Fill for the column you want to have fill the remaining available space in the DataGridView. You shouldn''t need to calculate the space yourself.


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

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