Hi I've got a problem with the ASP.NET Rad Treeview, with checkboxes. The user is able to navigate about the treeview using the cursor keys. However it seems the actual focus is not changing, it appears the focus is changing as the class of rtSelected class is being applied corresponding to the user's navigation using the cursor keys. The actual focus can be changed using the tab key. I've got screen shots which clearly show the focus and the highlighted (selected) nodes being different in IE and Chrome
Chrome...
http://i49.tinypic.com/sf9og0.png
The selected field text is highlighted in grey. The input with focus is highlighted with a yellow box.
IE
http://i49.tinypic.com/adhhls.png
The selected field text is highlighted in grey. The input with focus is highlighted with a dashed outline.
This is not just a cosmetic issue I'm finding when the user selects a node using the space bar, OnNodeCheck is fired twice, once for the selected node and another time for the node with focus.
The focus and the selected node should be the same regardless of what input method is used.
ASPX:-
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2.Default" %><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <script type="text/javascript"> function AfterUserLocationCheck(node) { var i; var nodes = node.TreeView.AllNodes; for (i = 0; i < nodes.length; i++) { if (nodes[i] != node) nodes[i].UnCheck(); } } </script></head><body> <form id="form1" runat="server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" EnablePageMethods="true" runat="server"> </asp:ToolkitScriptManager> <div> <telerik:RadTreeView ID="tvUserLocation" runat="server" AllowNodeEditing="False" DataFieldID="Id" DataFieldParentID="Parent" DataTextField="Name" DataValueField="ID" MultipleSelect="false" AfterClientCheck="AfterUserLocationCheck" Skin="Default" OnNodeCheck="tvUserLocation_OnNodeClick" TabIndex="1" CheckBoxes="True"> <Nodes> <telerik:RadTreeNode Text="World"> <Nodes> <telerik:RadTreeNode Text="Australia" /> <telerik:RadTreeNode Text="Germany" /> <telerik:RadTreeNode Text="United States" /> </Nodes> </telerik:RadTreeNode> </Nodes> </telerik:RadTreeView> </div> </form></body></html>Code Behind:-
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Diagnostics;namespace WebApplication2{ public partial class Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void tvUserLocation_OnNodeClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e) { Debug.WriteLine(e.Node.Text); } }}<telerik:RadListView ID="RadListView1" runat="server" DataSourceID="SqlDataSource0"...> ...... <ItemTemplate>
<%
# Session["CatalogID"] = Eval("SerialsID").ToString()%>
<telerik:RadListView ID="RadListView2" runat="server" DataSourceID="SqlDataSource1"...> ..... <ItemTemplate>
<%# Session["ProductID"] = Eval("ProductID").ToString()%>
<asp:Button runat="server" ID="btnRebind_Production" Text="" OnClientClick="somefunction"/>
<telerik:RadListView ID="RadListView3" runat="server" DataSourceID="SqlDataSource2"...>
....
<ItemTemplate>
<div>
<asp:Button runat="server" ID="btnRebind_Detail" Text="" OnClientClick="somefunction()/>
<asp:ImageButton runat="server" ID="img1" AlternateText="" CausesValidation="false" ImageUrl='<%# Eval("ImageURL") %>' Width="180px" Height="180px" />
<div>
</ItemTemplate>
</telerik:RadListView> </ItemTemplate> </telerik:RadListView> </ItemTemplate> </telerik:RadListView>$find(
"<%= RadListView1.ClientID %>").rebind(), the data sets for RadListView2 and 3 are wrong. I tried to wrap the RadListView3 with UpdatePanel and call _doPostBack("UpdatePanel1", ' '), but the dataset for RadListView 3 is wrong, it populated the ListView3 with another Catalog's details. Is there a way to only rebind certain child RadListView in Client-Side?
<telerik:RadTextBox ID="txtAuditor" runat="server"></telerik:RadTextBox><asp:RequiredFieldValidator runat="server" ID="rfvAuditor" ControlToValidate="txtAuditor" ErrorMessage="Auditor is required" Display="Dynamic" ForeColor="Red" ValidationGroup="Audit">*</asp:RequiredFieldValidator><telerik:RadButton ID="btnUpdate" Text="Update" runat="server" CommandName="Update" ValidationGroup="Audit"><telerik:RadAjaxManagerProxy runat="server" ID="RadAjaxManagerProxy"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btnUpdate"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="btnUpdate" /> <telerik:AjaxUpdatedControl ControlID="rfvAuditor" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManagerProxy>
The Grid in the parent control uses the User Control:
<EditFormSettings UserControlName="~/Controls/ComplianceFormAuditControl.ascx" EditFormType="WebUserControl">
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
</EditFormSettings>
The Audit validation summary is available on the page:
<asp:ValidationSummary runat="server" ID="vsAudit" ForeColor="Red" ValidationGroup="Audit" />
The Rad Ajax Manager on the parent page is configured:
<telerik:AjaxSetting AjaxControlID="grdAudit">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="grdAudit" />
<telerik:AjaxUpdatedControl ControlID="vsAudit" />
</UpdatedControls>
</telerik:AjaxSetting>
Doesn't seem to work. I have tried to manually call validation without success:
protected void grdAudit_InsertCommand(object sender, GridCommandEventArgs e)
{
Page.Validate("Audit");
InsertUpdateAudits(e, ComplianceFormAuditEntity.Status.New);
}
Any ideas?<MasterTableView CommandItemDisplay="TopAndBottom" DataSourceID="SqlDataSource1" DataKeyNames="ID"> <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"> </ExpandCollapseColumn> <Columns> <telerik:GridEditCommandColumn> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn UniqueName="ID" HeaderText="ID" DataField="ID" DataType="System.Int64" FilterControlAltText="Filter ID column" ReadOnly="True" SortExpression="ID"> </telerik:GridBoundColumn> ... ...
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Getron.AAM.EntityManagement;using System.Data;using Telerik.Web.UI;using Getron.Core.BussinesRuleEngine;using Getron.Core.Base.Web;using System.Text;public partial class Sections_TaskManagement_Controls_SelectRows : EntityProtectedUserControl{ private void Page_Load(object sender, System.EventArgs e) { if (Request.QueryString["ControlIntCode"] != null && Getron.Core.Tools.DataTableFieldOperation.ToInt64(Request.QueryString["ControlIntCode"].ToString(), 0) > 0) { RequestTemplateControl templateControl = new RequestTemplateControl(Getron.Core.Tools.DataTableFieldOperation.ToInt64(Request.QueryString["ControlIntCode"].ToString(), 0)); SqlDataSource1.ConnectionString = templateControl.DbSession.Connection.ConnectionString; SqlDataSource1.SelectCommand = templateControl.Query; this.RadGrid1.MasterTableView.Columns.Clear(); GridClientSelectColumn selectCol = new GridClientSelectColumn(); this.RadGrid1.MasterTableView.Columns.Add(selectCol); } }}<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SelectRows.ascx.cs" Inherits="Sections_TaskManagement_Controls_SelectRows" %> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Hay" /> <script type="text/javascript"> function GetRadWindow() { var oWindow = null; if (window.radWindow) oWindow = window.radWindow; else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; return oWindow; } function returnToParent() { //create the argument that will be returned to the parent page var oArg = new Object(); //get the city's name oArg.cityName = "deneme"; //get the selected date from RadDatePicker //oArg.selDate = datePicker.get_selectedDate().toLocaleDateString(); //get a reference to the current RadWindow var oWnd = GetRadWindow(); //Close the RadWindow and send the argument to the parent page if (oArg.selDate && oArg.cityName) { oWnd.close(oArg); } } </script> <telerik:RadGrid AutoGenerateColumns="true" ID="RadGrid1" DataSourceID="SqlDataSource1" EnableTheming="true" Width="760px" AllowFilteringByColumn="True" AllowSorting="True" PageSize="15" ShowFooter="True" AllowPaging="True" runat="server" GridLines="None" EnableLinqExpressions="false"> <PagerStyle Mode="NextPrevAndNumeric" /> <GroupingSettings CaseSensitive="false" /> <MasterTableView AllowFilteringByColumn="True" ShowFooter="True" TableLayout="Auto"></MasterTableView> <ClientSettings> <Selecting AllowRowSelect="true" /> </ClientSettings> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" ProviderName="System.Data.SqlClient" runat="server"> </asp:SqlDataSource> <hr /> <button title="Submit" id="close" onclick="returnToParent(); return false;">Seçilenleri Onayla</button>