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
8920
Locking child grid expanded
posted

Is there a way ( property set or something)  to lock child on the client expanded, so user won't be able to collapse it.  Also if it is then how to release lock on the postback ( on the server).

Parents
  • 17590
    Verified Answer
    Offline posted

    Hello mcseidel,

    In order to achieve your rquirement I suggest using a hidden field to hold the indeces or keys of the rows for which collapsing is to be prevented. The RowCollapsing clientside event handler can then check if the row to be collapsed is in that list in order to cancel the vent is necessary. 

    function WebHierarchicalDataGrid1_ContainerGrid_RowCollapsing(sender, eventArgs)

    {

       var a = document.getElementById('<%# HiddenField1.ClientID %>').value;

       var b = parseInt(a);

       if (eventArgs.get_row() === b ) {

            eventArgs.set_cancel(true);

        }

    }

    Please note that for this example I am using a single value stored in the hidden field.

    Hope this helped. Feel free to contact me if you have any additional questions.

     

     

Reply Children
No Data