| HtmlInputButton partAddButton = new HtmlInputButton(); |
| partAddButton.ID = "uiPartAddButton"; |
| partAddButton.Value = "Add A Web Part"; |
| partAddButton.Attributes.Add("onclick", "openWin_" + this.UniqueID + "(); return false;"); |
| partAddButton.RenderControl(writer); |
| StringBuilder script = new StringBuilder(); |
| script.Append("<script type=\"text/javascript\">"); |
| script.Append("function openWin_" + this.UniqueID + "() {"); |
| script.Append("var windowMan = GetRadWindowManager();"); |
| script.Append("var windowPane = windowMan.GetWindowByName('uiNewPartsWizard');"); |
| script.Append("windowPane.SetUrl('PortalWebPartCatalogPage.aspx?ControlID=" + this.UniqueID + "&ZoneId=" + this.currentZone.PortalPageZoneID.ToString() + "&Scope=" + this.WebPartManager.Personalization.Scope.ToString() + "');"); |
| script.Append("windowPane.SetTitle('New Web Part Wizard');"); |
| script.Append("windowPane.setSize(1000,650);"); |
| script.Append("windowPane.Show();}"); |
| script.Append("</script>"); |

Hi, all:
I got the "A critical error has occurred. Object reference not set to an instance of an object." error message, and this is b/c the e.NewObject within the LinqDataSource_Inserting event is null when I am inserting data.
The background of the problem:
I have two RadGrids. The top one contains contacts, and the bottom one contains one or more notes concerning a selected contact from the top grid. The user can create his own list of note subjects, from which he can choose only one when creating a new note. This list of subjects is bound to a dropdownlist with the markup below:
<asp:DropDownList ID="ddl_subjects" runat="server"
DataSourceID="LinqDS_Subjects" DataTextField="Subject"
DataValueField="SubjectId"
SelectedValue='<%# Bind("SubjectId") %>'
AppendDataBoundItems="True" >
<asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem>
</asp:DropDownList>
Every time when I create a new note, if I pick one of the bound values, the note inserts fine. But whenever I pick "Select", which has a value of null, to intentionally not assign a subject to the note, I get that error message. I spent hours debugging, but to no avail. So your help is greatly appreciated.
Han
var nodes = tree.get_checkedNodes();
for (var i = 0; i < nodes.length; i++) {
var node = nodes[i];
node.set_checked(false);
}
This script is called when either the OK or Cancel button is clicked, but if the user clicks the "X" this script is not run.
Also the rest of our application uses separate script files instead of embedding the javascript in the ASPX page.
I have tried adding a beforeonclose event handler but that appears to be too late in the cycle.
Please could someone suggest a way to accomplish this.
many thanks
Antony
