Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1414
Hide a row in a WebCombo
posted

To All,

 

I have a situation where I must display a 'status' in a grid cell managed by a webcombo (ie. a dropdown list in the webgrid).  However, I cannot allow the customer to select that 'status' from the combo box.  Thus, if the status is 'IR' than it should be displayed, but if it is something else the customer cannot select 'IR' from the dropdown.

 

The best I seem to be able to do is Hide the row, but that makes the value invisible in the grid. 

 

I would like to 'disable' the webcombo row, or hide it without affecting the grid display.

  • 7694
    posted

     

    Hello,

    You can try to validate selected row with JavaScript on client side. Please take a look code below:

    <ClientSideEvents BeforeSelectChange="Check" />

     

        <script type="text/javascript">

        function Check(comboID){

            var newSelectedRow = igcmbo_getComboById(comboID).selectedIndex;

            if(newSelectedRow == 0){ 

                return true;

            }

            return false;

        }

        </script>

     

    Hopes this helps.