提问人:agaesh kumar 提问时间:10/3/2023 最后编辑:jmcilhinneyagaesh kumar 更新时间:10/3/2023 访问量:34
减少 DatagridView 面板中的间隙
Reducing gap in the DatagridView's panel
问:
蓝色面板内部的 dgv 应最大化,没有任何间隙
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
If Not ValidateInput(CtrlDtl) Then Return
If Not ValidateAddItem() Then Return
AddRecord()
ClearDetails()
CalculateTotal()
txtAmtWithGst.Select()
With PanelDgvDocDtl
.Size = New Size(dgvKnockOff.Width * 0.415, dgvKnockOff.Height - 24)
Panel2.Height = .Height
.Location = New Point(dgvKnockOff.Right - PanelDgvDocDtl.Width, pnlTop.Height + 25)
.BringToFront()
End With
'this is my code that set size and location for the dgv
PanelDgvDocDtl.Visible = True
If dgvDocDtl.Rows.Count > 1 Then cmbBranchCode.Enabled = False
clearMode = False 'setting the clear mode false to prevent certain control from being cleared,
Clear() 'maybe there is a better way to handle this
clearMode = True 'setting it true. so the clear() method can clear all the controls it has. for other flow - agaesh
pnlTotal.Visible = True
End Sub
答: 暂无答案
评论
Dock
Anchor
Anchor