简体   繁体   中英

Visualization SPmenuField in SPGridView

I have created SPGridView and added one SPMenuField as the first column and some BoundFields . Then I added MenuTemplate to the first column. But there are rectangles with white color border. I want to hide them. How can I do it ?

问题网格视图

Here is the code I use:

   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);

Here is the answer on my question. It is nesseccery to narrow the .ms-menuimagecell css class.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM