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;
These properties must be set on the server. They control what HTML is rendered for the grid at the time of rendering.
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
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.