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

(The whole escaping issue in FF3.1 is really, really annoying.)
One more time. I'm running into an issue whereby the styles from the skin of the RadGrid are interferring with a RadComboBox located in a custom CommandItemTemplate. I have the stylesheetTheme set to my Theme name in the web.config file (i.e., I have it set to Default and I have a Theme called Default). I have a screenshot but am not sure how to post it.
Here are the relevant skins located in a .skin file in my Theme directory:
| <telerik:RadGrid runat="server" SkinID="NonPagingGrid" |
| Skin="Web20" |
| AllowPaging="false" |
| AllowSorting="true" |
| AutoGenerateColumns="false" |
| GridLines="None" |
| ShowStatusBar="true" |
| SortingSettings-EnableSkinSortStyles="false" |
| Width="100%"> |
| <StatusBarSettings LoadingText="Loading..." ReadyText="Ready" /> |
| <MasterTableView |
| AllowMultiColumnSorting="true" |
| AllowNaturalSort="true" |
| AllowSorting="true" |
| NoMasterRecordsText="" |
| ShowHeader="true" |
| ShowHeadersWhenNoRecords="true" |
| TableLayout="Fixed" |
| Width="100%"> |
| <NoRecordsTemplate> |
| <div style="text-align:left;padding-left:15px;padding-top:5px;">No matching records were found.</div> |
| </NoRecordsTemplate> |
| </MasterTableView> |
| <ClientSettings |
| AllowColumnsReorder="true" |
| AllowGroupExpandCollapse="true" |
| AllowKeyboardNavigation="true" |
| ClientEvents-OnRowCreated="RowCreated"> |
| <ClientEvents |
| OnGridCreated="AutoFitGridHeight" /> |
| <Resizing |
| AllowColumnResize="true" |
| EnableRealTimeResize="true" /> |
| <Scrolling |
| AllowScroll="true" |
| UseStaticHeaders="true" |
| SaveScrollPosition="true" /> |
| </ClientSettings> |
| <telerik:RadComboBox runat="server" SkinID="BorderedComboBox" |
| Skin="Vista" |
| Font-Size="11px" |
| MarkFirstMatch="true" |
| NoWrap="true" /> |
| <CommandItemTemplate> |
| <div id="CP_Cmd"> |
| <div class="CP_Cmd_C CP_Cmd_IB"> |
| <asp:ImageButton ID="AddProjectButtonImage" runat="server" meta:resourcekey="AddProjectButtonImage" |
| ImageUrl="~/App_Themes/Default/buttons/add_button.png" |
| CommandName="InitInsert" /> |
| </div> |
| <div class="CP_Cmd_C CP_Cmd_LB"> |
| <asp:LinkButton ID="AddProjectButton" runat="server" meta:resourcekey="AddProjectButton" |
| CommandName="InitInsert" /> |
| </div> |
| <div class="CP_Cmd_C CP_Cmd_IB"> |
| <asp:ImageButton ID="FillProjectButtonImage" runat="server" meta:resourcekey="FillProjectButtonImage" |
| ImageUrl="~/App_Themes/Default/buttons/add_button.png" |
| OnClick="FillProjectButton_Click" /> |
| </div> |
| <div class="CP_Cmd_C CP_Cmd_LB"> |
| <asp:LinkButton ID="FillProjectButton" runat="server" meta:resourcekey="FillProjectButton" |
| OnClick="FillProjectButton_Click" /> |
| </div> |
| <div class="CP_Cmd_C CP_Cmd_IB"> |
| <asp:ImageButton ID="FillSubprojectsImageButton" runat="server" meta:resourcekey="FillSubProjectsButton" |
| ImageUrl="~/App_Themes/Default/buttons/add_button.png" |
| OnClick="FillSubProjectButton_Click" /> |
| </div> |
| <div class="CP_Cmd_C CP_Cmd_LB"> |
| <asp:LinkButton ID="FillSubprojectsLinkButton" runat="server" meta:resourcekey="FillSubProjectsButton" |
| OnClick="FillSubProjectButton_Click" /> |
| </div> |
| <div class="reset CP_Cmd_C CP_Cmd_TempDDL" style="margin:0;padding:0;"> |
| <telerik:RadComboBox ID="TemplateSelectionEdit" runat="server" |
| SkinID="BorderedComboBox" |
| meta:resourcekey="TemplateSelectionEdit" /> |
| </div> |
| <div class="CP_Cmd_C CP_Cmd_IB"> |
| </div> |
| <div class="CP_Cmd_C CP_Cmd_IB CP_Cmd_R"> |
| <asp:ImageButton ID="RefreshGridImageButton" runat="server" meta:resourcekey="RefreshGridImageButton" |
| ImageUrl="~/App_Themes/Default/buttons/grid_refresh.gif" |
| CommandName="RebindGrid" /> |
| </div> |
| <div class="CP_Cmd_C CP_Cmd_LB CP_Cmd_R CP_Cmd_RLB"> |
| <asp:LinkButton ID="RefreshGridButton" runat="server" meta:resourcekey="RefreshGridButton" |
| CommandName="RebindGrid" /> |
| </div> |
| </div> |
| </CommandItemTemplate> |
| div#CP_Cmd |
| { |
| height: 2.5em; |
| padding-top: 0.5em; |
| padding-left: 1em; |
| } |
| div#CP_Cmd div.CP_Cmd_C |
| { |
| float: left; |
| display:block; |
| } |
| /*Image button*/ |
| div#CP_Cmd div.CP_Cmd_IB |
| { |
| width: 2em; |
| } |
| /*Link button*/ |
| div#CP_Cmd div.CP_Cmd_LB |
| { |
| width: 8em; |
| } |
| /*Refresh buttons*/ |
| div#CP_Cmd div.CP_Cmd_R |
| { |
| float:rightright; |
| padding-right: 1em; |
| } |
| /*Refresh link buttons*/ |
| div#CP_Cmd div.CP_Cmd_RLB |
| { |
| width: 4em; |
| padding-right: 0.5em; |
| } |
| /* Template dropdown*/ |
| div#CP_Cmd div.CP_Cmd_TempDDL |
| { |
| width: 15em; |
| } |
| /* Template button*/ |
| div#CP_Cmd div.CP_Cmd_TempB |
| { |
| } |
<
telerik:RadDockZone ID="RadDockZone1" runat="server" BorderStyle="None">
<telerik:RadDock ID="RadZone1" runat="server" Width="100%" Title="Group" BorderStyle="None"
BorderWidth="0px" Height="652px" Top="155px" Left="245px" DefaultCommands="None"
EnableDrag="False">
<telerik
:RadComboBox ID="ddlgroupCategory" AllowCustomText="True" ShowMoreResultsBox="true"
EnableVirtualScrolling="true" runat="server" skin="Outlook"
EmptyMessage="Select the category..."
onitemsrequested="ddlgroupCategory_ItemsRequested"></telerik:RadComboBox>
<telerik:RadDock
</telerik:RadDockZone>
| Protected Overrides Sub CreateChildControls() |
| MyBase.CreateChildControls() |
| GenerateTable() |
| End Sub |
| Private Sub GenerateTable() |
| If BtnExpandOpen Then |
| Dim ctrl = GetProperControl(RowIndex) |
| If ctrl IsNot Nothing Then |
| ctrl.WriteToDisplay(Me) |
| PanelCategory.Controls.Add(ctrl) |
| End If |
| End If |
| End Sub |
| Private Sub btnExpand_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnExpand.Click |
| BtnExpandOpen = Not BtnExpandOpen |
| SetExpandButtonState() |
| GenerateTable() |
| End Sub |
What have I do if I need to create RagGrid not in PageInit or PageLoad events but rendered grid must have some postbacks (i.e. paging)?
[NullReferenceException: Object reference not set to an instance of an object.] Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +8609 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175