RowContextMenu Issue

1 reply. Last post: December 28, 2010 9:50 PM by Frank Bruce
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
Frank BruceMember

I want  to hide the blue lines when I hide some menus.
how to do it?Or how can I custom the menu on assigned position???

(please see the attach picture!)

function WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject) {

    menuObject.Items.GetNamedItem("mnuCopyCell").Hide();
    menuObject.Items.GetNamedItem("mnuCopyRow").Hide();
    menuObject.Items.GetNamedItem("mnuCopyTable").Hide();
    menuObject.Items.GetNamedItem("mnuHelp").Hide();
    menuObject.Items.GetNamedItem("mnuDelete").Hide();
    menuObject.Items.GetNamedItem("mnuRefresh").Hide();
    menuObject.Items.GetNamedItem("mnuEdit").Hide();
    
    var addOne = new WebMenuItem();
    addOne.Text = '添加1行';
    addOne.OnClick = "insertGridRows(1)";
    menuObject.Items.Add(addOne);
    var deleteRows = new WebMenuItem();
    deleteRows.Text = '删除多行';
    deleteRows.Name = 'delterows';
    deleteRows.OnClick = "deleteMutRows()";
    menuObject.Items.Add(deleteRows);

}
1 attachment
All times are GMT -5. The time now is 4:31 PM.
Previous Next