我创建了SPGridView
并添加了一个SPMenuField
作为第一列和一些BoundFields
。然后我将MenuTemplate
添加到第一列。但是有一些带有白色边框的矩形。我想隐藏它们。我该怎么做 ?
以下是我使用的代码:
SPMenuField colMenu = new SPMenuField();
colMenu.HeaderText = "Title";
colMenu.TextFields = "Title";
colMenu.MenuTemplateId = "TitleListMenu";
colMenu.NavigateUrlFields = "WebId, ListId, ID";
colMenu.NavigateUrlFormat = "default.aspx?WebID={0}&ListID={1}&ListItemID={2}";
colMenu.TokenNameAndValueFields = "Param1=ID";
colMenu.SortExpression = "Title";
MenuTemplate typeListMenu = new MenuTemplate();
typeListMenu.ID = "TitleListMenu";
// ... //
Controls.Add(typeListMenu);
customGridView.Columns.Add(colMenu);