Apr 04, 2014, 6:20 AM
Tab key Issue with Ext.net Dynamiclly created Checkbox .
I have create and add checkbox using C# code. Its working fine but the problem is tab key press in IE. In that on tab key press, focus move on Text associated with checkbox but in other browser like firefox, chrome checkbox get focused. [images Attached.]
I am looking to focus on checkbox in IE. I have tried with CSS and some other but nothing I found to fix that issue. and the code i use for it is:
I am looking to focus on checkbox in IE. I have tried with CSS and some other but nothing I found to fix that issue. and the code i use for it is:
//ASP.net Dynamic Table Control.
Table chkBoxTable = getTable();
TableRow chkBoxRow = getTableRow();
TableCell chkBoxCell = null;
Ext.Net.Checkbox objcheckbox;
XmlNodeList l_objDropDownValues = XmlNodeList[1].SelectNodes("Values/value"); //Find Number if check Boxs from dropdown.
for (int k = 0; k < l_objDropDownValues.Count; k++)
{
objcheckbox = new Ext.Net.Checkbox(false, l_objDropDownValues[k].Attributes["text"].Value);
objcheckbox.ID = "chk" + l_objDropDownValues[k].Attributes["ValuesID"].Value;
objcheckbox.Attributes.Add("cls", "label-text");
objcheckbox.TabIndex = tabindx++;
objcheckbox.Listeners.Check.Handler = "show(" + l_objDropDownTobacco.ClientID + ");";
objcheckbox.Listeners.SpecialKey.Fn = "chkonEnter";
//Create td.
chkBoxCell = getTableCell();
chkBoxCell.Width = Unit.Pixel((k % 2 == 0) ? 60 : 190);
chkBoxCell.Controls.Add(objcheckbox);
if (chkBoxRow.Cells.Count >= 2)
{
chkBoxTable.Rows.Add(chkBoxRow);
chkBoxRow = getTableRow();
}
chkBoxRow.Cells.Add(chkBoxCell);
if (k == (l_objDropDownValues.Count - 1))
{
chkBoxTable.Rows.Add(chkBoxRow);
}
}
//Add table with checkbox control on page.
setControls(getLabelControl(l_objControlsNodeList[1]), chkBoxTable, l_objTable);