or
radconfirm("Are you sure you want to postback?", aspButtonCallbackFn, 330, 180, null, "Confir"); in the javascript script. When I just click RadButton that fire up OnClientClicking Event. The focus should be on the window when it opens. Focus should stay within the modal window when I continue tabbing. I am able to tab to other screen elements. The focus should stay within the modal window: OK, Cancel and Close (X) buttons.private void InitializeGrid(){ try { // add columns Telerik.Web.UI.GridBoundColumn boundColumn = new Telerik.Web.UI.GridBoundColumn(); boundColumn = new Telerik.Web.UI.GridBoundColumn(); uxOrderListControl.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = "OrderId"; boundColumn.UniqueName = "OrderId"; boundColumn.HeaderText = "Order Id"; boundColumn.DataType = typeof(System.Guid); boundColumn.Display = false; boundColumn = new Telerik.Web.UI.GridBoundColumn(); uxOrderListControl.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = "Locked"; boundColumn.UniqueName = "Locked"; boundColumn.HeaderText = "Locked"; boundColumn.DataType = typeof(System.Boolean); boundColumn.Display = false; Telerik.Web.UI.GridImageColumn imageColumn = new Telerik.Web.UI.GridImageColumn(); uxOrderListControl.MasterTableView.Columns.Add(imageColumn); imageColumn.UniqueName = "LockImage"; imageColumn.HeaderText = "L"; imageColumn = new Telerik.Web.UI.GridImageColumn(); uxOrderListControl.MasterTableView.Columns.Add(imageColumn); imageColumn.UniqueName = "A"; imageColumn.HeaderText = "A"; imageColumn = new Telerik.Web.UI.GridImageColumn(); uxOrderListControl.MasterTableView.Columns.Add(imageColumn); imageColumn.UniqueName = "E"; imageColumn.HeaderText = "E"; boundColumn = new Telerik.Web.UI.GridBoundColumn(); uxOrderListControl.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = "OrderType"; boundColumn.UniqueName = "OrderType"; boundColumn.HeaderText = "Type"; boundColumn.DataType = typeof(System.String); boundColumn = new Telerik.Web.UI.GridBoundColumn(); uxOrderListControl.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = "CurrentOrderId"; boundColumn.UniqueName = "CurrentOrderId"; boundColumn.HeaderText = "Number"; boundColumn.DataType = typeof(System.String); boundColumn = new Telerik.Web.UI.GridBoundColumn(); uxOrderListControl.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = "OrderDate"; boundColumn.DataFormatString = "{0:d}"; boundColumn.UniqueName = "OrderDate"; boundColumn.HeaderText = "Date"; boundColumn.DataType = typeof(System.DateTime); boundColumn = new Telerik.Web.UI.GridBoundColumn(); uxOrderListControl.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = "Total"; boundColumn.DataFormatString = "{0:c}"; boundColumn.UniqueName = "Total"; boundColumn.HeaderText = "Total"; boundColumn.DataType = typeof(System.Decimal); boundColumn = new Telerik.Web.UI.GridBoundColumn(); uxOrderListControl.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = "BillToName"; boundColumn.UniqueName = "BillToName"; boundColumn.HeaderText = "Bill To Name"; boundColumn.DataType = typeof(System.String); boundColumn = new Telerik.Web.UI.GridBoundColumn(); uxOrderListControl.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = "SoldToName"; boundColumn.UniqueName = "SoldToName"; boundColumn.HeaderText = "Sold To Name"; boundColumn.DataType = typeof(System.String); boundColumn = new Telerik.Web.UI.GridBoundColumn(); uxOrderListControl.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = "Lookup"; boundColumn.UniqueName = "Lookup"; boundColumn.HeaderText = "Lookup"; boundColumn.DataType = typeof(System.String); boundColumn = new Telerik.Web.UI.GridBoundColumn(); uxOrderListControl.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = "NeedToEdi"; boundColumn.UniqueName = "NeedToEdi"; boundColumn.HeaderText = "Need To EDI"; boundColumn.DataType = typeof(System.Boolean); boundColumn = new Telerik.Web.UI.GridBoundColumn(); uxOrderListControl.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = "ReferralInvoiceId"; boundColumn.UniqueName = "ReferralInvoiceId"; boundColumn.HeaderText = "Ref ID"; boundColumn.DataType = typeof(System.Guid); uxOrderListControl.MasterTableView.DataKeyNames = new string[] { "OrderId", "ReferralInvoiceId" }; if (_hierarchical) { uxOrderListControl.ClientSettings.AllowExpandCollapse = true; uxOrderListControl.MasterTableView.HierarchyLoadMode = GridChildLoadMode.Client; uxOrderListControl.MasterTableView.HierarchyDefaultExpanded = true; uxOrderListControl.MasterTableView.SelfHierarchySettings.ParentKeyName = "ReferralInvoiceId"; uxOrderListControl.MasterTableView.SelfHierarchySettings.KeyName = "OrderId"; uxOrderListControl.MasterTableView.SelfHierarchySettings.MaximumDepth = 2; } } catch { throw; }}#endregion
Protected Sub rtvReports_ContextMenuItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeViewContextMenuEventArgs) Select Case e.Node.Level Case 1 'Not important to example Case 2 Dim ReportType As String = e.Node.ParentNode.Text Dim ReportName As String = e.Node.Text Dim Logid As String = e.Node.Value Dim ClientID As String = Session("ClientID") Select Case e.MenuItem.Value Case "Delete" Session("CurrentReportTreeNode") = e.Node.ParentNode lbDeleteReportType.Text = e.Node.ParentNode.Text lbDeleteReportName.Text = e.Node.Text lbDeleteLogID.Text = e.Node.Value RadWindowManager1.RadConfirm("Delete Report: " & lbDeleteReportName.Text, "DeleteReportcallback", 300, 100, Nothing, "Delete Report Confirmation") Exit Select End Select End SelectEnd SubHere is the client side function DeleteReportCallBack which seems to work fine:
function DeleteReportcallback(arg) { if (arg == true) { __doPostBack("ctl00$ContentPlaceHolder1$btnDelete", ""); }}Here is the asp button:
<asp:button id="btnDelete" runat="server" Text="" height=0 width="0" style="background-color:white; border-color:White; border-width:0" OnCLick="btnDelete_Click" />Here is the button handler and the subroutine that rebuilds the nodes at that level:
Protected Sub btnDelete_Click() Dim ReportType As String = lbDeleteReportType.Text Dim ReportName As String = lbDeleteReportName.Text Dim LogID As String = lbDeleteLogID.Text DeleteReport(LogID, ReportName, ReportType) Dim CurrentNode As RadTreeNode = Session("CurrentReportTreeNode") LoadReports(CurrentNode)End SubSub LoadReports(curnode As RadTreeNode) Dim ReportType As String = curnode.Text Dim ReportTypeParent As String = curnode.ParentNode.Text Dim CLientID As String = Session("ClientID") Dim dt As New DataTable If curnode.Nodes.Count > 0 Then For I As Integer = curnode.Nodes.Count - 1 To 0 Step -1 curnode.Nodes(I).Remove() Next End If dt = BindChartNames(ReportType, CLientID) 'Gets the relevant reports from the database If dt IsNot Nothing And dt.Rows.Count > 0 Then dt.DefaultView.Sort = "ReportName ASC" For Each row As DataRow In dt.Rows Dim node As New RadTreeNode() node.Text = row("ReportName").ToString() node.Value = row("LogID").ToString() node.ContextMenuID = "ReportMenu" node.HoveredCssClass = "TreeHover" curnode.Nodes.Add(node) Next curnode.Expanded = True curnode.ExpandMode = TreeNodeExpandMode.ClientSide End IfEnd SubAnd here is the ajax manager and the tree definition (minus some context menus not pertinent to my question):
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" > <AjaxSettings> <telerik:AjaxSetting AjaxControlID="rtvReports"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rtvReports" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="pnlDetails" /> <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> <telerik:AjaxUpdatedControl ControlID="pnlReportType" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="btnOverwrite" > <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rtvReports" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManager><telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Office2010Black" InitialDelayTime="400" /> <telerik:RadTreeView ID="rtvReports" runat="server" OnNodeExpand="rtvReports_NodeExpand" OnContextMenuItemClick="rtvReports_ContextMenuItemClick" Skin="Office2010Silver" OnNodeClick="rtvReports_NodeClick" OnPreRender="rtvReports_PreRender"> <ContextMenus> <telerik:RadTreeViewContextMenu runat="server" ID="ReportMenu" ClickToOpen="True"> <Items> <telerik:RadMenuItem Text="Edit" Value="Edit"> </telerik:RadMenuItem> <telerik:RadMenuItem Text="Run" Value="Run"> </telerik:RadMenuItem> <telerik:RadMenuItem Text="Schedule" Value="Schedule"> </telerik:RadMenuItem> <telerik:RadMenuItem Text="Delete" Value="Delete"> </telerik:RadMenuItem> </Items> </telerik:RadTreeViewContextMenu> </ContextMenus> </telerik:RadTreeView>One further note on this issue: I have a Refresh function on the parent node to the reports in the context menu. And after I delete a report node and the node is still there, I run the refresh command from the parent node and it calls the same LoadReports subroutine and it works fine.
Thanks for any help on this.
LoadReports