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).
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); } }
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.
Thanks, that will work.
I am glad that I have been able to help. Feel free to contact me if you need any further support!