- Resize based on WindowContent
- Disable Scrollbars
I'm trying to display a RadWindow that when it loads will resize based on the size of the content inside the RadWindow iframe.
After it has been resized to fit the content I would like to disable the scrollbars for that iframe.
Below is a sample of the javascript I've got so far but am having trouble disabling the scrollbars
function GetSelectedWindow()
{
var oManager = GetRadWindowManager();
return oManager.getActiveWindow();
}
function
ChangeSize()
{
var oWindow = GetSelectedWindow();
var width = oWindow._iframe.contentWindow.document.body.scrollWidth;
var height = oWindow._iframe.contentWindow.document.body.scrollHeight;
oWindow._iframe.style.overflow = 'hidden'; //doesn't work
Window._iframe.scrolling = 'no'; //doesn't work
oWindow._enablePageScrolling(false); //doesn't work
oWindow.setSize(width, height);
}
| protected void Lookup_ItemsRequested(object sender, RADHeaderTemplate.LookupBoxExpandedArgs e) |
| { |
| DataTable table; |
| RadComboBox combo; |
| DataRow row; |
| table = new DataTable(); |
| table.Columns.Add("Col1"); |
| table.Columns.Add("Col2"); |
| table.Columns.Add("Col3"); |
| row = table.NewRow(); |
| row.ItemArray = new string[] { "Row1Cell1", "Row1Cell2", "Row1Cell3" }; |
| table.Rows.Add(row); |
| row = table.NewRow(); |
| row.ItemArray = new string[] { "Row2Cell1", "Row2Cell2", "Row2Cell3" }; |
| table.Rows.Add(row); |
| combo = e.ComboBox; |
| combo.DataSource = table; |
| combo.DataBind(); |
| } |
I am using the RadTree in the ASP.NET AJAX Toolkit and have run into a problem. I cannot use the tri-state functionality for certain situations in my code and must use a custom JavaScript function to uncheck parent nodes when the child node is unselected. I found this snippet in the knowledge base. Unfortunately it does not work as promised.
When I run this code it unchecks the parent node but also unchecks all of the current nodes siblings. I put an alert function in the while loop and found that it returns a message that says “I am unchecking undefined”. What am I missing? Thank you.
function clientNodeChecked(sender, eventArgs)
{
var node = eventArgs.get_node();
alert("I am unchecking " + node.Text);
if (!node.get_checked())
{
while (node.get_parent().set_checked != null)
{
node.get_parent().set_checked(false);
node = node.get_parent();
alert("I am unchecking " + node.Text);
}
}
}
| RadGrid1.DataSource = from x in OtogramContext.ObjectScope().Extent<Otogram>() |
| select new |
| { |
| Patient = x.patient.name, |
| Physician = x.physicianName, |
| HearingLoss = x.AMAHearingScore, |
| Clinic = x.clinicName, |
| Customer = x.customerID |
| }; |