简体   繁体   English

在SPGridview中禁用ECB菜单

[英]Disable ECB menu in SPGridview

I need to disable OOtb Filtering and Sorting menu in SPGridview and apply custom filtering and sorting. 我需要在SPGridview中禁用OOtb筛选和排序菜单,然后应用自定义筛选和排序。 So far i have done custom part and it comnfuses with ootb filtering when user tried to use both. 到目前为止,我已经完成了自定义部分,并且当用户尝试同时使用二者时,它与ootb过滤相结合。 so suggest me a way to disable ootb filtering and sorting in spgridview 所以建议我在spgridview中禁用ootb过滤和排序的方法

Disabling ECB menu in SPgridview is bit tricky and using jquery would be ideal to do that. 在SPgridview中禁用ECB菜单有些棘手,而使用jquery将是理想的选择。

    <script type="text/javascript"> 
      $(document).ready(function() {
        $('.ms-unselectedtitle').removeAttr("onclick");
        $('.ms-unselectedtitle').removeAttr("onmouseover");
        $('.ms-menuimagecell').remove();
      }); 
    </script>

simply it will remove the onclick and onmousover attribute as well as remove the arrow image from spgridview header.. 只需删除onclick和onmousover属性,以及从spgridview标头中删除箭头图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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