This is a migrated thread and some comments may be shown as answers.

RadTabStrip with tabs containing Silverlight grids.

1 Answer 66 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Michael Fernandez
Top achievements
Rank 1
Michael Fernandez asked on 01 Mar 2010, 04:56 PM
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

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;  
            }  
        }  
    };  

1 Answer, 1 is accepted

Sort by
0
Michael Fernandez
Top achievements
Rank 1
answered on 02 Mar 2010, 08:48 PM
This turned out to be a problem with one of our custom validators and not an issue with the RadTabStrip.
Tags
TabStrip
Asked by
Michael Fernandez
Top achievements
Rank 1
Answers by
Michael Fernandez
Top achievements
Rank 1
Share this question
or