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

[Solved] Use Static Header

1 Answer 160 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff Tang
Top achievements
Rank 1
Jeff Tang asked on 04 Jun 2009, 04:18 AM
I have the following client settings in my RadGrid using the static header. However, when I try to select a row, the reaction is very slow and the layout out the grid content even totally change.(eg. the column width become very wide) I need to allow rows selection and use static hearder with scrolling. Could you please advice what is the problem of my grid. Thanks.
                                    

           <telerik:RadGrid ID="rgAfftAdd" runat="server" AutoGenerateColumns="False"
                                               GridLines="None" Skin="WebBlue" Width="100%" BorderStyle="Solid"
                                               BorderColor="#3399FF" BorderWidth="1px"
                                               AllowMultiRowSelection="True" AllowSorting="True"
                                               onprerender="rgAfftAdd_PreRender">
                                                 
                                        <SelectedItemStyle BackColor="#99CCFF" />      
                                     
                                        <ClientSettings>
                                                 <Selecting AllowRowSelect="true" />
                                               <Scrolling AllowScroll="True" UseStaticHeaders="true"></Scrolling> 
                                        </ClientSettings>   

                                        <MasterTableView Font-Bold="False" Font-Italic="False" Font-Overline="False"
                                                         Font-Strikeout="False" Font-Underline="False" PageSize="2000"
                                                        
                                            ClientDataKeyNames="TYPE, START_TIME, ADDR, SP_CUST, REC_NO, lid, ln_sub_no"
                                            Width="98%" AllowMultiColumnSorting="True">
                                                          
                                                <RowIndicatorColumn>
                                                    <HeaderStyle Width="20px"></HeaderStyle>
                                                </RowIndicatorColumn>

                                                <ExpandCollapseColumn>
                                                    <HeaderStyle Width="20px"></HeaderStyle>
                                                </ExpandCollapseColumn>
                                           
                                                <Columns>
                                                    <telerik:GridBoundColumn DataField="TYPE" HeaderText="Type" UniqueName="TYPE">
                                                        <HeaderStyle Width="12%" />
                                                        <ItemStyle VerticalAlign="Top" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="START_TIME" DataType="System.DateTime"
                                                                             HeaderText="Start Time" UniqueName="START_TIME"
                                                                             DataFormatString="{0:dd/MM/yyyy HH:mm:ss}">
                                                        <HeaderStyle Width="14%" />
                                                        <ItemStyle VerticalAlign="Top" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="ADDR" HeaderText="Address" UniqueName="ADDR">
                                                        <HeaderStyle Width="59%" />
                                                        <ItemStyle VerticalAlign="Top" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="SP_CUST" HeaderText="Sp. Cust."
                                                                             UniqueName="SP_CUST" Aggregate="Count" ReadOnly="True">
                                                        <HeaderStyle Width="15px" />
                                                        <ItemStyle VerticalAlign="Top" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="REC_NO" HeaderText="Rec_No" UniqueName="REC_NO" Visible = "false">
                                                        <ItemStyle VerticalAlign="Top" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="lid" UniqueName="lid" Visible = "false" >
                                                        <ItemStyle VerticalAlign="Top" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="ln_sub_no" UniqueName="ln_sub_no" Visible = "false">
                                                        <ItemStyle VerticalAlign="Top" />
                                                    </telerik:GridBoundColumn>
                                                </Columns>
                                               
                                                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                                                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False"
                                                             Font-Strikeout="False" Font-Underline="False" ForeColor="Black" Wrap="True" />       
                                        </MasterTableView>                   

                                        <FilterMenu EnableTheming="True" Skin="WebBlue">
                                            <CollapseAnimation Duration="200" Type="OutQuint" />
                                        </FilterMenu>

                                </telerik:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 05 Jun 2009, 12:24 PM
Hi Jeff Tang,

Please, refer to my answer to ticket #216866, under forum thread title: Use Static Headers decrease performance. For the benefit of other people that might find their way to this forum thread, I am posting below the proposed solution:
---------------------------------------------------------------------------------------------------------------------------------------------
The style table-layout property of the outermost table should be set to fixed. This seems to be a browser related issue.
---------------------------------------------------------------------------------------------------------------------------------------------

All the best,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Jeff Tang
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or