If a user has resized a control, is there a way to make the control stay that size after a postback?
Hello Peggy
Please take a look at our online documentation regarding Persistance framework here - http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=PersistenceFramework_Landing_Page.html Another helpful place is our online sample browser - http://samples.infragistics.com/aspnet/ComponentOverview.aspx?cn=persistence-framework Where can be found 10 samples. Another option if you just want to persist X and Y of that control is to use hidden input elements and to save in their value the X and the Y. Every time in onLoad page to check if (isPostback) and to set the width and height of the control.
All I really want to do is persist the height and width on a webdatagrid. I'm not sure how to do that. Do you have a simple example (in VB) that shows how to do that in the postback?
Sorry about posting twice. My browser didn't indicate that it had been posted...
I got it to work. Here is my handler function:
function myhandler() { var grid = $find('<%=WebDataGrid1.ClientID%>'); document.getElementById('<%=gHeight.ClientID%>').value = grid.get_element().style.height; document.getElementById('<%=gWidth.ClientID%>').value = grid.get_element().style.width; }
Is there a trick to make this work when using a master page? I've modified your sample to use a master page and it has very strange side effects.
Hello Peggy,
Please take a look at the attached from me sample which contains WDG and resizer and keeps the WDG size after postback. The second page is in VB. Please in future responses to us try to explain your scenario in details in order to receive helpful answers fast
Also, I'm a VB programmer. Is it possible to get sample code in VB?
Thanks for the sample. That's sort of what I had but I want to attach the handler to the onclientresize event of the webresizingextender. I can't seem to get that to work right. how do I attach the handler to that event?