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

onCreated

1 Answer 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 17 Apr 2010, 04:36 PM

Hello all,

I have one radgrid whose heigh is changed according to user machine resolution, this is done by invoking

<ClientEvents OnGridCreated="onGridCreated" /> 

Height is working properly, however when a row is selected, header row gives the appearance of moving by increasing and decreasing its width.

This is how columns are defined:

 <telerik:GridBoundColumn   
                                UniqueName="Subject"   
                                SortExpression="Subject" HeaderText="Subject" DataField="Subject" ItemStyle-Width="33%">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn   
                                UniqueName="EntityName"   
                                SortExpression="Displayname" HeaderText="Entity" DataField="Displayname" ItemStyle-Width="14%">  
                        </telerik:GridBoundColumn> 

able on which this grid is inserted has this style: 
style

 

="table-layout:fixed;"

 

and this is the javascript function:

 function onGridCreated(sender, args) {  
 
 
            try {  
                var scrollArea = sender.GridDataDiv;  
                var gridHeader = sender.GridHeaderDiv;  
                var ostage;  
                var vpaging;  
                var vmenu;  
                vpaging = 0;  
                vmenu = 20;  
 
                if (document.getElementById("ucPagingList_divPaginacion") != null)  
                    vpaging = 22;  
 
                if (scrollArea != null && gridHeader != null) {  
                    if (parent.document.getElementById("stage") != null) {  
                        ostage = parent.document.getElementById("stage").clientHeight;  
                        scrollArea.style.height = ostage - gridHeader.clientHeight - 25 - vpaging - vmenu  + "px";  
                    }  
                    else {  
                        scrollArea.style.height = screen.availHeight - gridHeader.clientHeight - vpaging - vmenu  + "px";  
                    }  
                }  
            }  
            catch (err) {  
            }  
 
        } 

any clue ?, tried a lot of possible actions with no result  ... :(

 

 

 
Thanks in advance


1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 20 Apr 2010, 11:43 AM
Hello Alex,

Are you using scrolling with static headers? In such cases RadGrid needs to adjust its layout on the client, which may result in some flickering. I can suggest you to use a (less transparent) loading panel while the control is being updated via AJAX.

If the above information is not relevant to your scenario, please send a runnable demo.

Kind regards,
Dimo
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or