RAD GRID COLUMN RESIZING & REORDERING ISSUE

2 posts, 0 answers
  1. Ajay
    Ajay avatar
    66 posts
    Member since:
    May 2009

    Posted 06 Jul 2009 Link to this post

    <table cellspacing="0" cellpadding="0" border="0" width="100%" height="100%" text-align="left">    
    <tr> 
            <td> 
                <telerik:RadGrid ID="SearchResultsRadGrid" runat="server"   
                    DataSourceID="SiteSearchResultsObjectDataSource" SkinID="RadGridHeaderSkin"   
                    GridLines="Vertical"  Style="margin: 0px 10px 0px 10px" OnSelectedIndexChanged="SearchResultsRadGrid_SelectedIndexChanged" 
                    OnItemDataBound="SearchResultsRadGrid_ItemDataBound"   
                    OnNeedDataSource="SearchResultsRadGrid_NeedDataSource"   
                    AutoGenerateColumns="False" onprerender="SearchResultsRadGrid_PreRender"   
                    Skin="Default">  
                    <MasterTableView DataKeyNames="ID" TableLayout = "Fixed"   
                        DataSourceID="SiteSearchResultsObjectDataSource" Frame="Void">  
                        <NoRecordsTemplate> 
                        No records to display !  
                        </NoRecordsTemplate> 
                        <Columns> 
                            <telerik:GridTemplateColumn HeaderText="Status" UniqueName="TemplateColumn">  
                                <ItemTemplate> 
                                    <asp:Label ID="StatusImageLabel" runat="server"></asp:Label> 
                                </ItemTemplate> 
                              <HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="60px"  /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridBoundColumn DataField="Name" HeaderText="Site Name" SortExpression="Name" 
                                UniqueName="Name">  
                            <HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="40%"  /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City" 
                                UniqueName="City">  
                              <HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="15%"  /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="StateName" HeaderText="State" SortExpression="StateName" 
                                UniqueName="StateName" ReadOnly="True">  
                              <HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="15%"   /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="CountryName" HeaderText="Country" SortExpression="CountryName" 
                                UniqueName="CountryName" ReadOnly="True">  
                             <HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Height="5px" Width="15%"   /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="Zipplus4" HeaderText="Zip" SortExpression="Zipplus4" 
                                UniqueName="Zipplus4">  
                               <HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="15%"   /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridTemplateColumn HeaderText="Action" UniqueName="TemplateColumn1">  
                                <ItemTemplate> 
                                    <asp:ImageButton ID="EditImageButton" runat="server" CssClass="GridActionColumn" CommandArgument='<%# Eval("ID") %>' 
                                        ImageUrl="~/App_Themes/PANCAN_Theme/Images/edit.gif" ToolTip="Edit" OnClick="EditImageButton_Click" 
                                        CausesValidation="False" /> 
                                      
                                    <asp:LinkButton ID="PreviewLinkButton" runat="server" CssClass="GridActionColumn" CausesValidation="False" CommandName="Select" 
                                        EnableViewState="False" Visible="false">Preview</asp:LinkButton> 
                                    <asp:HiddenField ID="StatusHiddenField" runat="server" Value='<%# Eval("Active") %>' /> 
                                </ItemTemplate> 
                           <HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="60px"  /> 
                            </telerik:GridTemplateColumn> 
                        </Columns> 
                      </MasterTableView> 
                     
                </telerik:RadGrid> 
                <asp:ObjectDataSource ID="SiteSearchResultsObjectDataSource" runat="server" SelectMethod="SearchSite" 
                    TypeName="ServiceLayer.SiteService">  
                    <SelectParameters> 
                        <asp:ControlParameter ControlID="FindSiteHiddenField" Name="SearchString" PropertyName="Value" 
                            Type="String" /> 
                        <asp:ControlParameter ControlID="SiteStatusHiddenField" Name="Status" PropertyName="Value" 
                            Type="String" /> 
                        <asp:ControlParameter ControlID="ActionHiddenField" Name="Action" PropertyName="Value" 
                            Type="String" /> 
                    </SelectParameters> 
                </asp:ObjectDataSource> 
            
            </td> 
        </tr> 
    Hi Telerik Admin !

    Im using the TELERIK RAD GRID with DEAFULT SKIN(Q2 2009). I have folowing problem :-

    Whenever I reorder my columns of the GRID the overall alignment of the page gets distubed. I have used the SKIN for the RED GRID(i.e. I have mentioned all the CLIENT SETTTING property for the GRID in SKIN file.) . I have placed my RAD GRID within in row of the Table with TABLE havong the follwing property :
     Cellspacing = 0px
     Cellpadding = 0px
     Border = 0px
    width = 100%
    height = 100%

    Now whenever  , I reoder the columns of the RAD GRID & click on to the colums headers(try to sort), the RAD GRID gets STREACHED for its mean position, as a result of which the other controls on to the other <TD> of the Table gets distorted and overall structure of the webpage gets disturbed.

    My providing you with the CODE that Iam using.
    This is the SKIN FILE for the RAD GRID.  
    ---------------------------------------  
     
     
    <telerik:RadGrid runat="server" Skinid="RadGridHeaderSkin">  
        <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true"  AllowColumnsReorder="true" ReorderColumnsOnClient="true">  
         <Resizing AllowRowResize="True" EnableRealTimeResize="false" ClipCellContentOnResize="false" ResizeGridOnColumnResize="true" AllowColumnResize="True"></Resizing> 
            <Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true" ScrollHeight="20px" /> 
            <Selecting AllowRowSelect="true" /> 
             
        </ClientSettings> 
    </telerik:RadGrid> 

    Plase help to sort out this probelm.


     

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 08 Jul 2009 Link to this post

    Hello Ajay,

    Thank you for contacting us.

    Unfortunately I could not replicate the described error. Please find the attached test project which I have created in my attempt to reproduce the suggested approach.

    Regards,
    Georgi Krustev
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top