Posted 2 December 2019, 3:53 pm EST
Hello Ruchir,
I have a treeview with multiple columns and contains some data. My requirement is , when the focus comes on the treeview or if I use arrow keys to navigate through the rows, the screen reader (in my case JAWS) should announce the selected row’s data. Hope you got my requirement.
I used the designer itself to add the column and the nodes. Below is the designer generated code.
c1TreeColumn2.HeaderText = "Items";
c1TreeColumn2.Name = "Items";
this.c1TreeView2.Columns.Add(c1TreeColumn2);
this.c1TreeView2.Location = new System.Drawing.Point(489, 90);
this.c1TreeView2.Name = "c1TreeView2";
c1TreeNode8.Expanded = true;
c1TreeNode9.SetValue("Child 1");
c1TreeNode10.SetValue("Child 2");
c1TreeNode11.SetValue("Child 3");
c1TreeNode8.Nodes.Add(c1TreeNode9);
c1TreeNode8.Nodes.Add(c1TreeNode10);
c1TreeNode8.Nodes.Add(c1TreeNode11);
c1TreeNode8.SetValue("Parent 1");
c1TreeNode12.Expanded = true;
c1TreeNode13.SetValue("Child 1");
c1TreeNode14.SetValue("Child 2");
c1TreeNode12.Nodes.Add(c1TreeNode13);
c1TreeNode12.Nodes.Add(c1TreeNode14);
c1TreeNode12.SetValue("Parent 2");
this.c1TreeView2.Nodes.Add(c1TreeNode8);
this.c1TreeView2.Nodes.Add(c1TreeNode12);
Thanks
Ajith