我有一个Winform.Till里面有一个TabContainer填充模式我正在添加另一个表格与组框和DataGridView与停靠模式填充作为选项卡控件中的选项卡控件与停靠模式fill.I已设置滚动条DataGridView的属性,但不能显示水平。
if (activeForm != null &&
hasReviseAvgDiscountPermission == true)
{
//Add for in tab page.
FrmRePricing reviseAvgDiscount = new FrmRePricing(activeForm, secondaryUser);
if (reviseAvgDiscount.WidgetDataLoaded == true)
{
reviseAvgDiscount.CloseOnEscape = false;
reviseAvgDiscount.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
reviseAvgDiscount.TopLevel = false;
tabPgAvgDiscountRevision.Controls.Add(reviseAvgDiscount);
reviseAvgDiscount.Dock = DockStyle.Fill;
reviseAvgDiscount.Show();
reviseAvgDiscount.Focus();
}
else
{
//Remove tab page if no data found.
tabWidget.TabPages.Remove(tabPgAvgDiscountRevision);
}
这是加载表单作为控件的代码。我在网格中有数据,显示了很多列,但显示了一些列。