Hello everyone,
I have setted up a value for the AccessKey attribute, but, at runtime, I don't get the focus on the ultrawebtree control when I press the corresponding combination of keys.
I mention that the Section508Compliant atribute is setted to true,and acording to the documentation, the control should be accesible. A basic requirement of accesibility is that the control could be reached (in our case we should be able to move the focus on it) with keystrokes combinations, without the use of the mouse.
How can I access the Ultrawebtree control in this context? Why the Accessibility keydoes not move the focus on the control? What alternatives do I have in order to implement the accesibility with this control?
Thank you,
C.
Hello,
This is very weird, I really do not see any reasons why <%= uwtNavigation.ClientID %> should not be working. Is it possible that the javascript is somehow out of the scope of the page.. I really do not know.
Hardcoding the ID is fine, as long is the layout of the page is not changed, since changing the layout may change the ClientID of the tree.
The problem was when retrieving the name of the tree:
--------------------------------------------------------
tree = igtree_getTreeById("<%= uwtNavigation.ClientID %>");
I have substituted it with
tree = igtree_getTreeById("ctl00uwtNavigation");
where ctl00uwtNavigation is the name of the owtNavigation control after rendering, in the HTML page.
Still I don't understand why the function igtree_getTreeById("<%= uwtNavigation.ClientID %>") doesn't retrieve nothing. Do I need to put some references?
Cheers,
Hi Ivan,
I followed the "CSOM way" in order to get the focus to the ultrawebtree control, as it follows:
- I have added a dummy control which can implement the accesskey, for example a textbox, And I have setted the Accesskey property.
As I didn't succeed to set the focus on the Ultrawebtree (as a whole) either by c# code or by CSOM, I will select the first node in the tree instead of setting the focus on the webtree.
- I have declared in a .js file the following function:
------------------------------------------------------------------
var tree;
var nodes;
var node;
function SetFocusOnWebTree()
{
try
nodes = tree.getNodes();
node = nodes[0];
node.setSelected(true);
}
catch(err)
alert(err.description);
-----------------------------------------------------------------------------
- back on our aspx page, I register the .js file:
----------------------------------------------------------------------------
protected void Page_Load(object sender, EventArgs e)
if (!Page.ClientScript.IsClientScriptIncludeRegistered("MyFunctions"))
Page.ClientScript.RegisterClientScriptInclude("MyFunctions", ResolveClientURL("~/UI/Assets/MyFunctions.js"));
-----------------------------------------------------------------------------------
- I am addind the atribute "onfocus" to the dummy textbox control
protected void txtDummy_PreRender(object sender, EventArgs e)
this.txtDummy.Attributes.Add("onfocus", "SetFocusOnWebTree()");
Running the page, I am pressing the accesskey keys, and I receive the following error message:
-------------------------------------------------------------------------------------
'tree' is null or not an object
which means that the problem is on the CSOM part.
How can I select a node with the CSOM? Can you post a sample?
These articles are not a direct answer to my question.
UltraWebTree control has a method called Focus(). How can I make this method work? Also, how can made functional the Accesibility features on the webtree?
Hello,Please take a look at the links below:http://news.infragistics.com/forums/p/15184/55875.aspx#55875http://news.infragistics.com/forums/p/11120/42208.aspx#42208
Thanks.