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

Javascript Function working in IE7, not working in IE6

3 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vimal Kumar
Top achievements
Rank 1
Vimal Kumar asked on 18 Mar 2009, 07:21 AM
Hi There,

I am working on telerik. I have used grid created function for my grid, which is working fine in IE7 but not working for IE6. Can anybody help me to know where i am doing mistake. The code i have used is:
<script type="text/javascript">   
        //------ Grid Resize ------ //                    
        function GridCreated()     
        {  
           var scrollArea = document.getElementById("<%= rgIssueList.ClientID %>" + "_GridData");                           
           var dataHeight =  document.getElementById("ctl00_ContentPlaceHolder1_rgIssueList_ctl00");      
           var dataWidth = document.getElementById("ctl00_ContentPlaceHolder1_rgIssueList_ctl00_Header");     
           
            if(dataHeight.clientHeight < 350)  
            {  
              scrollArea.style.height = dataHeight.clientHeight + 20 + "px";  
              scrollArea.style.overflow = "auto";  
            }  
        }  
</script> 
Can anybody help me to come out of this problem??? Waiting....

Regards:
Vimal Kumar Srivastava
Madhepura, Bihar
Email Id: vimaltech04@gmail.com



3 Answers, 1 is accepted

Sort by
0
Vimal Kumar
Top achievements
Rank 1
answered on 20 Mar 2009, 10:18 AM
Hi There,

Can anybody there, who can help me to come out of this problem. Waiting for reply......

Regards:
Vimal Kumar Srivastava
Email Id: vimaltech04@gmail.com



0
Daniel
Telerik team
answered on 23 Mar 2009, 11:34 AM
Hello Vimal,

Could you please elaborate a bit on your scenario?  It would also be helpful if you can provide some details about the problem.

In the meantime I recommend you modify your code a bit:
<script type="text/javascript" language="javascript"
    function GridCreated(sender) 
    { 
        var clientID = sender.ClientID; 
        var scrollArea = document.getElementById(clientID + "_GridData"); 
        var dataHeight = document.getElementById(clientID + "_ctl00"); 
        var dataWidth = document.getElementById(clientID + "_ctl00_Header"); 
 
        if (dataHeight.clientHeight < 350) 
        { 
            scrollArea.style.height = dataHeight.clientHeight + 20 + "px"
            scrollArea.style.overflow = "auto"
        } 
    } 
</script> 

Kind regards,
Daniel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
senthil
Top achievements
Rank 1
answered on 06 Apr 2009, 09:43 AM
I need to work this script for all resolution.Actually I want the grid should be resize both horizontally and vertically with scroll bars while I Resize the window.Please can any one help for this?If you have script pls send me.

Thanks and Regards,
Senthil Kumar.T
mailto:senthil153@gmail.com
Tags
Grid
Asked by
Vimal Kumar
Top achievements
Rank 1
Answers by
Vimal Kumar
Top achievements
Rank 1
Daniel
Telerik team
senthil
Top achievements
Rank 1
Share this question
or