There are a way to set this properties of the UltraWebGrid using javascript?
_gridControl.Browser = Infragistics.WebUI.UltraWebGrid.BrowserLevel.DownLevel; _gridControl.DisplayLayout.ReadOnly = ReadOnly.PrintingFriendly;
hii,,
in my page i have two web panels panel1, panel2 and a webgrid in panel2 on collapsing panel 1 i have to change the height of webgrid in panel2 using java script.. plz can any one help me how can i do this??
thanks in advance
Hello,
There is a client-side object model (CSOM) for WebGrid documented here which you can use:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR3.5/html/WebGrid_Object_CSOM.html
You cannot set server-side properties with javascript unless you are doing AJAX or PostBack to the server.
I see that you have this question posted in other threads, as well as a support case.
Sorry for that....
My best suggestion is to not try to render out the HTML of your page in this fashion.
Do you know any other way?
My best suggestion is to not try to render out the HTML of your page in this fashion. This is likely to break a lot of functionality that WebGrid depends on, as well as other controls.
Bad news....
Ok, maybe you could have some ideas of how to resolve my issue...I am using this code to print a UltraWebGrid:
--------------------------------------------------------------------------------------------------------------------------------------------------------
void printButton_Click(object sender, EventArgs e) { _gridControl.Browser = Infragistics.WebUI.UltraWebGrid.BrowserLevel.DownLevel; _gridControl.DisplayLayout.ReadOnly = ReadOnly.PrintingFriendly; string script = "<script language=javascript> " + " var Grid = document.getElementById('" + _gridControl.ClientID + "'); " + " var prtContent = document.getElementById('" + div.ClientID + "'); " + " var WinPrint = window.open('','','left=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status=0'); " + " WinPrint.document.write(prtContent.innerHTML); " + " WinPrint.document.close(); " + " WinPrint.print(); " + " WinPrint.close(); " + "</script> "; this.Parent.Page.RegisterStartupScript("Script", script); _gridControl.Browser = Infragistics.WebUI.UltraWebGrid.BrowserLevel.Auto; _gridControl.DisplayLayout.ReadOnly = ReadOnly.NotSet; }
the problem is that the Script is executed in other Event,
not as I hope in this line: this.Parent.Page.RegisterStartupScript("Script", script);
that line only register the Javascript and the problem is that when the Script is called the properties of the Grid was reverted to:
_gridControl.Browser = Infragistics.WebUI.UltraWebGrid.BrowserLevel.Auto; _gridControl.DisplayLayout.ReadOnly = ReadOnly.NotSet;
and some javascript make my page to raise a JS error.