This is a migrated thread and some comments may be shown as answers.

Set height of splitter

1 Answer 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 15 Jul 2013, 09:11 AM
Hi

Using client scripting, how can I set the splitter and pane height same as that of content element?

Thanks
Ben

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Jul 2013, 09:43 AM
Hi

Please have a look at the following JavaScript code.

JavaScript:
<script type="text/javascript">
    function setheight() {
        var splitter = $find("<%= RadSplitter1.ClientID %>");
        var pane = splitter.getPaneById('<%= contentPane.ClientID %>');
        var height = pane.getContentElement().scrollHeight;
        splitter.set_height(height);
        pane.set_height(height);
    }
</script>

Thanks,
Princy.
Tags
General Discussions
Asked by
Ben
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or