c# - Setting TabIndex at runtime based on criteria -
i've got asp.net app c# code-behind. query table based on series of dropdownlists, , based on choices there 10 possible fields might displayed. it's little complicated, 2 separate instances, might see these fields:
txteffdate
txtepro
tbaccountnum
ddlbustype
chkescalated
and these fields:
tbaccountnum
txtclientid
txtepro
ddlbustype
chkrework
chkescalated
it's table driven logic fine, wanted give background.
the problem is, when we're determining controls make visible tab order goes wonky. i'm trying set tab index when i'm checking controls. i've got this:
if (reader.getbyte(0) == 1) { txteffdate.visible = true; lbleffdate.visible = true; txteffdate.tabindex = 9; } if (reader.getbyte(0) == 2) { txtclientid.visible = true; lblclientid.visible = true; txtclientid.tabindex = 7; }
etc... index isn't changing.
anyone know i'm doing wrong?
Comments
Post a Comment