We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Splitter height change not reflected on server

Hi

I'm changing the height of a splitter control using client side code (that I took from a forum thread). This code works fine.

However, on a subsequent postback to the server the splitter height is the old height and not the new height.

Is there anyway I can make the new height get transfered to the server?

Thanks
Steve



2 Replies

MW Melba Winshia Syncfusion Team January 29, 2009 08:49 AM UTC

Hi Steve,

Thank you for your interest in Syncfusion Products.

You can make the new height get transferred to the server by using the asp HiddenField control. Please refer below code to achieve this:

[Javascript]

function ChangeSplitterHeight( nDelta )
{
_sfSplitter1.SetHeight( nDelta );
document.getElementById('HiddenField1').value=_sfSplitter1.GetHeight();
}

[C#]

protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
this.Splitter1.Height= Unit.Pixel((Int16.Parse(this.HiddenField1.Value)));
}
}

Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com/samples/Tools.Web/7.1.0.21/F79213_SplitterHeight/main.htm

Please try this and let me know if this helps.

Regards,
Melba




SG Stephen Girolami January 29, 2009 09:24 AM UTC

Thanks Melba i'll give it a try


Loader.
Live Chat Icon For mobile
Up arrow icon