I'm using a RadTabStrip that contains RadTabs with Silverlight grids (RadGridView). The grids are configured with validators. On postback while attempting to save to the database I'm having the following issue: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. The Java script debugger breaks on the d.focus() call in the script segment below. This segement is from RadInputControl.js from Telerik.Web.UI. d is the Silverlight grid and its offsetWidth is 0 at this point. Also, this grid is not on the current visible tab. Let me know if you need more information.
Thanks, Mike Fernandez
Thanks, Mike Fernandez
| if(typeof(ValidatorSetFocus)=="function"){ |
| ValidatorSetFocus=function(f,c){ |
| var d; |
| if(typeof(f.controlhookup)=="string"){ |
| var a; |
| if((typeof(c)!="undefined")&&(c!=null)){ |
| if((typeof(c.srcElement)!="undefined")&&(c.srcElement!=null)){ |
| a=c.srcElement; |
| } |
| else{ |
| a=c.target; |
| } |
| } |
| if((typeof(a)!="undefined")&&(a!=null)&&(typeof(a.id)=="string")&&(a.id==f.controlhookup)){ |
| d=a; |
| } |
| } |
| if((typeof(d)=="undefined")||(d==null)){ |
| d=document.getElementById(f.controltovalidate); |
| } |
| var b=false; |
| if((d.style)&&(typeof(d.style.visibility)!="undefined")&&(d.style.visibility=="hidden")&& |
| (typeof(d.style.width)!="undefined")&&(document.getElementById(d.id+"_text")|| |
| document.getElementById(d.id+"_dateInput_text"))&&(d.tagName.toLowerCase()=="input"|| |
| d.tagName.toLowerCase()=="textarea")){ |
| b=true; |
| } |
| if((typeof(d)!="undefined")&&(d!=null)&&(d.tagName.toLowerCase()!="table"||(typeof(c)=="undefined") |
| ||(c==null))&&((d.tagName.toLowerCase()!="input")||(d.type.toLowerCase()!="hidden"))&& |
| (typeof(d.disabled)=="undefined"||d.disabled==null||d.disabled==false)&&(typeof(d.visible)=="undefined"|| |
| d.visible==null||d.visible!=false)&&(IsInVisibleContainer(d)||b)){ |
| if(d.tagName.toLowerCase()=="table"&&(typeof(__nonMSDOMBrowser)=="undefined"||__nonMSDOMBrowser)){ |
| var g=d.getElementsByTagName("input"); |
| var e=g[g.length-1]; |
| if(e!=null){ |
| d=e; |
| } |
| } |
| if(typeof(d.focus)!="undefined"&&d.focus!=null){ |
| if(b&&document.getElementById(d.id+"_text")){ |
| document.getElementById(d.id+"_text").focus(); |
| } |
| else { |
| if(b&&document.getElementById(d.id+"_dateInput_text")){ |
| document.getElementById(d.id+"_dateInput_text").focus(); |
| } |
| else{ |
| d.focus(); //breaks here. |
| } |
| } |
| Page_InvalidControlToBeFocused=d; |
| } |
| } |
| }; |
| } |