Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2be47940
由
HZH
编写于
2019-09-10 16:44:37 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
解决树表格,行高度问题
1 个父辈
2e54711e
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
13 行增加
和
12 行删除
HZH_Controls/HZH_Controls/Controls/ComboBox/UCComboxGridPanel.Designer.cs
HZH_Controls/HZH_Controls/Controls/ComboBox/UCComboxGridPanel.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridView.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.Designer.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.cs
HZH_Controls/Test/FrmTemp1Test.Designer.cs
HZH_Controls/Test/FrmTemp1Test.cs
HZH_Controls/HZH_Controls/Controls/ComboBox/UCComboxGridPanel.Designer.cs
查看文件 @
2be4794
...
@@ -117,7 +117,7 @@ namespace HZH_Controls.Controls
...
@@ -117,7 +117,7 @@ namespace HZH_Controls.Controls
this
.
ucDataGridView1
.
HeadHeight
=
40
;
this
.
ucDataGridView1
.
HeadHeight
=
40
;
this
.
ucDataGridView1
.
HeadPadingLeft
=
0
;
this
.
ucDataGridView1
.
HeadPadingLeft
=
0
;
this
.
ucDataGridView1
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDataGridView1
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDataGridView1
.
IsAutoHeight
=
false
;
this
.
ucDataGridView1
.
Is
Close
AutoHeight
=
false
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
false
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
false
;
this
.
ucDataGridView1
.
IsShowHead
=
true
;
this
.
ucDataGridView1
.
IsShowHead
=
true
;
this
.
ucDataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
5
);
this
.
ucDataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
5
);
...
...
HZH_Controls/HZH_Controls/Controls/ComboBox/UCComboxGridPanel.cs
查看文件 @
2be4794
...
@@ -105,7 +105,7 @@ namespace HZH_Controls.Controls
...
@@ -105,7 +105,7 @@ namespace HZH_Controls.Controls
{
{
InitializeComponent
();
InitializeComponent
();
this
.
ucDataGridView1
.
Page
=
m_page
;
this
.
ucDataGridView1
.
Page
=
m_page
;
this
.
ucDataGridView1
.
IsAutoHeight
=
false
;
this
.
ucDataGridView1
.
Is
Close
AutoHeight
=
false
;
this
.
txtSearch
.
txtInput
.
TextChanged
+=
txtInput_TextChanged
;
this
.
txtSearch
.
txtInput
.
TextChanged
+=
txtInput_TextChanged
;
this
.
ucDataGridView1
.
ItemClick
+=
ucDataGridView1_ItemClick
;
this
.
ucDataGridView1
.
ItemClick
+=
ucDataGridView1_ItemClick
;
}
}
...
...
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridView.cs
查看文件 @
2be4794
...
@@ -260,6 +260,8 @@ namespace HZH_Controls.Controls
...
@@ -260,6 +260,8 @@ namespace HZH_Controls.Controls
if
(!
typeof
(
IDataGridViewRow
).
IsAssignableFrom
(
value
)
||
!
value
.
IsSubclassOf
(
typeof
(
Control
)))
if
(!
typeof
(
IDataGridViewRow
).
IsAssignableFrom
(
value
)
||
!
value
.
IsSubclassOf
(
typeof
(
Control
)))
throw
new
Exception
(
"行控件没有实现IDataGridViewRow接口"
);
throw
new
Exception
(
"行控件没有实现IDataGridViewRow接口"
);
m_rowType
=
value
;
m_rowType
=
value
;
if
(
value
==
typeof
(
UCDataGridViewTreeRow
))
IsCloseAutoHeight
=
true
;
ResetShowCount
();
ResetShowCount
();
if
(
m_columns
!=
null
&&
m_columns
.
Count
>
0
)
if
(
m_columns
!=
null
&&
m_columns
.
Count
>
0
)
ReloadSource
();
ReloadSource
();
...
@@ -385,18 +387,18 @@ namespace HZH_Controls.Controls
...
@@ -385,18 +387,18 @@ namespace HZH_Controls.Controls
/// <summary>
/// <summary>
/// The m is automatic height
/// The m is automatic height
/// </summary>
/// </summary>
private
bool
m_isAutoHeight
=
false
;
private
bool
m_is
Close
AutoHeight
=
false
;
/// <summary>
/// <summary>
/// 自动适应最大高度(当为true时,需要手动计算高度,请慎用)
/// 自动适应最大高度(当为true时,需要手动计算高度,请慎用)
/// </summary>
/// </summary>
/// <value><c>true</c> if this instance is automatic height; otherwise, <c>false</c>.</value>
/// <value><c>true</c> if this instance is automatic height; otherwise, <c>false</c>.</value>
[
Browsable
(
false
)]
[
Browsable
(
false
)]
public
bool
IsAutoHeight
public
bool
Is
Close
AutoHeight
{
{
get
{
return
m_isAutoHeight
;
}
get
{
return
m_is
Close
AutoHeight
;
}
set
set
{
{
m_isAutoHeight
=
value
;
m_is
Close
AutoHeight
=
value
;
this
.
AutoScroll
=
value
;
this
.
AutoScroll
=
value
;
}
}
}
}
...
@@ -838,7 +840,7 @@ namespace HZH_Controls.Controls
...
@@ -838,7 +840,7 @@ namespace HZH_Controls.Controls
{
{
if
(
this
.
Height
<=
0
)
if
(
this
.
Height
<=
0
)
return
;
return
;
if
(
m_isAutoHeight
)
if
(
m_is
Close
AutoHeight
)
return
;
return
;
ResetShowCount
();
ResetShowCount
();
ReloadSource
();
ReloadSource
();
...
...
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.Designer.cs
查看文件 @
2be4794
...
@@ -136,7 +136,7 @@ namespace HZH_Controls.Controls
...
@@ -136,7 +136,7 @@ namespace HZH_Controls.Controls
this
.
ucDGVChild
.
HeadHeight
=
40
;
this
.
ucDGVChild
.
HeadHeight
=
40
;
this
.
ucDGVChild
.
HeadPadingLeft
=
0
;
this
.
ucDGVChild
.
HeadPadingLeft
=
0
;
this
.
ucDGVChild
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDGVChild
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDGVChild
.
IsAutoHeight
=
false
;
this
.
ucDGVChild
.
Is
Close
AutoHeight
=
false
;
this
.
ucDGVChild
.
IsShowCheckBox
=
false
;
this
.
ucDGVChild
.
IsShowCheckBox
=
false
;
this
.
ucDGVChild
.
IsShowHead
=
false
;
this
.
ucDGVChild
.
IsShowHead
=
false
;
this
.
ucDGVChild
.
Location
=
new
System
.
Drawing
.
Point
(
25
,
0
);
this
.
ucDGVChild
.
Location
=
new
System
.
Drawing
.
Point
(
25
,
0
);
...
...
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.cs
查看文件 @
2be4794
...
@@ -137,7 +137,7 @@ namespace HZH_Controls.Controls
...
@@ -137,7 +137,7 @@ namespace HZH_Controls.Controls
{
{
InitializeComponent
();
InitializeComponent
();
this
.
ucDGVChild
.
RowType
=
this
.
GetType
();
this
.
ucDGVChild
.
RowType
=
this
.
GetType
();
this
.
ucDGVChild
.
IsAutoHeight
=
true
;
this
.
ucDGVChild
.
Is
Close
AutoHeight
=
true
;
this
.
SizeChanged
+=
UCDataGridViewTreeRow_SizeChanged
;
this
.
SizeChanged
+=
UCDataGridViewTreeRow_SizeChanged
;
this
.
ucDGVChild
.
ItemClick
+=
(
a
,
b
)
=>
this
.
ucDGVChild
.
ItemClick
+=
(
a
,
b
)
=>
{
{
...
...
HZH_Controls/Test/FrmTemp1Test.Designer.cs
查看文件 @
2be4794
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
this
.
ucDataGridView1
.
HeadHeight
=
40
;
this
.
ucDataGridView1
.
HeadHeight
=
40
;
this
.
ucDataGridView1
.
HeadPadingLeft
=
24
;
this
.
ucDataGridView1
.
HeadPadingLeft
=
24
;
this
.
ucDataGridView1
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDataGridView1
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDataGridView1
.
IsAutoHeight
=
false
;
this
.
ucDataGridView1
.
Is
Close
AutoHeight
=
false
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
false
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
false
;
this
.
ucDataGridView1
.
IsShowHead
=
true
;
this
.
ucDataGridView1
.
IsShowHead
=
true
;
this
.
ucDataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
61
);
this
.
ucDataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
61
);
...
...
HZH_Controls/Test/FrmTemp1Test.cs
查看文件 @
2be4794
...
@@ -20,7 +20,6 @@ namespace Test
...
@@ -20,7 +20,6 @@ namespace Test
private
void
FrmTemp1Test_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmTemp1Test_Load
(
object
sender
,
EventArgs
e
)
{
{
this
.
ucDataGridView1
.
RowType
=
typeof
(
UCDataGridViewTreeRow
);
this
.
ucDataGridView1
.
RowType
=
typeof
(
UCDataGridViewTreeRow
);
this
.
ucDataGridView1
.
IsAutoHeight
=
true
;
List
<
DataGridViewColumnEntity
>
lstCulumns
=
new
List
<
DataGridViewColumnEntity
>();
List
<
DataGridViewColumnEntity
>
lstCulumns
=
new
List
<
DataGridViewColumnEntity
>();
lstCulumns
.
Add
(
new
DataGridViewColumnEntity
()
{
DataField
=
"ID"
,
HeadText
=
"编号"
,
Width
=
70
,
WidthType
=
SizeType
.
Absolute
});
lstCulumns
.
Add
(
new
DataGridViewColumnEntity
()
{
DataField
=
"ID"
,
HeadText
=
"编号"
,
Width
=
70
,
WidthType
=
SizeType
.
Absolute
});
...
@@ -42,7 +41,7 @@ namespace Test
...
@@ -42,7 +41,7 @@ namespace Test
Sex
=
i
%
2
Sex
=
i
%
2
};
};
lstSource
.
Add
(
model
);
lstSource
.
Add
(
model
);
//
AddChilds(model, 5);
AddChilds
(
model
,
5
);
}
}
var
page
=
new
UCPagerControl2
();
var
page
=
new
UCPagerControl2
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论