Grid FrozenColumn shows an Extra Blank Column at the End of the Columns While Scrolling.

8 posts, 1 answers
  1. Brijesh
    Brijesh avatar
    8 posts
    Member since:
    Sep 2010

    Posted 26 Oct 2010 Link to this post

    Hi All..
    I am using Frozen Column Property of the Grid..
    Its working fine but there is a Issue that is when i use scroll it shows one Extra Blank Column at the End of the Columns.

    I have used the Folling Setting.

    <ClientSettings EnableRowHoverStyle="true">
                <ClientEvents OnGridCreated="GetGridObject"></ClientEvents>
                <Selecting AllowRowSelect="true" />
                <Scrolling AllowScroll="true" UseStaticHeaders="true" FrozenColumnsCount="3" ScrollHeight="" />
    </ClientSettings>

    I have attached the Image in that the last Column after the Sent Email.. That is the Problem For me. In this Image the Red Circled column is the Issue..

    Please suggest some solution for this problem.

    Thanks in Advance..
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 26 Oct 2010 Link to this post

    Hi Brijesh,

    The problem can be caused by the fact that the sum of all widths of the last visible columns (when scrolling to the far right) does not match the available space for non-frozen columns. You can fix that by changing the widths of the last columns. Note that the RadGrid width matters in this case, so if the RadGrid width depends on its container,you will not be able to achieve a fixed-width frozen columns in all cases.

    Additionally, it seems that the attachment did not make it through. Can you please re-attach the image if the problem still persists.

    All the best,
    Pavlina
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brijesh
    Brijesh avatar
    8 posts
    Member since:
    Sep 2010

    Posted 27 Oct 2010 Link to this post

    Hi,

    I have checked my code. i haven't used any width in the column.

    Here is my Grid Code and also i have attached the full Grid Image. 
    Please give me the any good solution.

    Thanks in Advance...

    *********************** Code *****************************
        <telerik:RadGrid ID="radgrdJobItems" runat="server" AutoGenerateColumns="False" AllowMultiRowSelection="true"
                AllowPaging="true" AllowSorting="true" AllowCustomPaging="true" AllowMultiRowEdit="false"
                OnNeedDataSource="radgrdJobItems_NeedDataSource" EnableAjaxSkinRendering="true"
                ShowStatusBar="true" OnSortCommand="radgrdJobItems_SortCommand" OnItemDataBound="radgrdJobItems_ItemDataBound"
                OnItemCommand="radgrdJobItems_ItemCommand" OnPageIndexChanged="radgrdJobItems_PageIndexChanged"
                >
                <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
                <ClientSettings EnableRowHoverStyle="true">
                    <ClientEvents OnGridCreated="GetGridObject"></ClientEvents>
                    <Selecting AllowRowSelect="true" />
                    <Scrolling AllowScroll="True" UseStaticHeaders="true" FrozenColumnsCount="6" ScrollHeight="" />
                </ClientSettings>
                <ExportSettings IgnorePaging="true" OpenInNewWindow="true">
                    <Pdf />
                </ExportSettings>
                <MasterTableView DataKeyNames="JobItemId" CommandItemDisplay="Top" EnableNoRecordsTemplate="true"
             TableLayout="Auto" Width="100%" ClientDataKeyNames="JobItemId">
                    <CommandItemTemplate>
                        <table width="100%">
                            <tr>
                                <td width="20%">
                                    <%--<asp:CheckBox runat="server" ID="chkShowHide" Text="<%$ Resources:iCatConstant, ShowBarcodeImage%>" />--%>
                                    <asp:ImageButton ID="Delete" runat="server" CommandName="Delete" ToolTip="<%$ Resources:iCatConstant, Delete%>"
                                        ImageUrl="~/ProjectResources/Images/FormImages/Reject.png" OnClientClick="return DeletConfirm(this);" />&nbsp;
                                    <asp:LinkButton ID="lnkDelete" CommandName="Delete" ToolTip="<%$ Resources:iCatConstant, Delete%>"
                                        Text="<%$ Resources:iCatConstant, Delete%>" runat="server" OnClientClick="return DeletConfirm(this);"></asp:LinkButton>
                                </td>
                                <td width="80%" align="right">
                                    <asp:ImageButton ID="GenerateReport" runat="server" CommandName="GenerateReport"
                                        ToolTip="<%$ Resources:iCatConstant, GenerateReport%>" ImageUrl="~/ProjectResources/Images/FormImages/CommandReport.png" />&nbsp;<asp:LinkButton
                                            ID="lnkGenerateReport" CommandName="GenerateReport" ToolTip="<%$ Resources:iCatConstant, GenerateReport%>"
                                            Text="<%$ Resources:iCatConstant, GenerateReport%>" runat="server"></asp:LinkButton>
                                    &nbsp;
                                    <asp:ImageButton ID="GenerateBarcode" runat="server" CommandName="GenerateBarcode"
                                        ToolTip="<%$ Resources:iCatConstant, GenerateBarcode%>" ImageUrl="~/ProjectResources/Images/FormImages/CommandBarcode.png" />&nbsp;<asp:LinkButton
                                            ID="lnkGenerateBarcode" CommandName="GenerateBarcode" ToolTip="<%$ Resources:iCatConstant, GenerateBarcode%>"
                                            Text="<%$ Resources:iCatConstant, GenerateBarcode%>" runat="server"></asp:LinkButton>
                                    &nbsp;|&nbsp;
                                    <asp:ImageButton ID="ExportToPdfButton" runat="server" CommandName="ExportToPdf"
                                        ToolTip="<%$ Resources:iCatConstant, ExportToPdf%>" ImageUrl="~/ProjectResources/Images/FormImages/CommandPdf.png" />
                                    <asp:ImageButton ID="ExportToExcelButton" runat="server" CommandName="ExportToExcel"
                                        ToolTip="<%$ Resources:iCatConstant, ExportToExcel%>" ImageUrl="~/ProjectResources/Images/FormImages/CommandExcel.png" />
                                    <asp:ImageButton ID="ExportToWordButton" runat="server" CommandName="ExportToWord"
                                        ToolTip="<%$ Resources:iCatConstant, ExportToWord%>" ImageUrl="~/ProjectResources/Images/FormImages/CommandWord.png" />
                                    <asp:ImageButton ID="ExportToCsvButton" runat="server" CommandName="ExportToCsv"
                                        ToolTip="<%$ Resources:iCatConstant, ExportToCSV%>" ImageUrl="~/ProjectResources/Images/FormImages/CommandCSV.png" />
                                    &nbsp;|&nbsp;
                                    <asp:ImageButton ID="Refresh" runat="server" CommandName="Rebind" ToolTip="<%$ Resources:iCatConstant, Refresh%>"
                                        ImageUrl="~/ProjectResources/Images/FormImages/CommandRefresh.png" />&nbsp;<asp:LinkButton
                                            ID="lnkRefresh" CommandName="Rebind" Text="<%$ Resources:iCatConstant, Refresh%>"
                                            ToolTip="<%$ Resources:iCatConstant, Refresh%>" runat="server"></asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                    </CommandItemTemplate>
                    <Columns>
                        <telerik:GridClientSelectColumn UniqueName="CheckboxSelectColumn" HeaderStyle-HorizontalAlign="Center"
                            ItemStyle-HorizontalAlign="Center" />
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, Group %>" Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Image ID="imgGroup" runat="server" />
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, Accessory %>"
                            Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Image ID="imgAccessory" runat="server" />
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, PartBin %>"
                            Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Image ID="imgPartBin" runat="server" />
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, Ref %>" DataField="JobItemId"
                            SortExpression="JobItemId" AllowFiltering="true" UniqueName="JobItemId" Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblJobItemId" Text='<%# Eval("JobItemId") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Right" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, Description %>"
                            DataField="ItemName" SortExpression="ItemName" AllowFiltering="true" UniqueName="ItemName"
                            Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblDescription" Text='<%# Eval("ItemName") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, Job %>" DataField="JobId"
                            SortExpression="JobId" AllowFiltering="true" UniqueName="JobId" Visible="false">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblJobId" Text='<%# Eval("JobId") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, Job %>" DataField="ParentJobItemId"
                            SortExpression="ParentJobItemId" AllowFiltering="true" UniqueName="ParentJobItemId"
                            Visible="false">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblParentJobItemId" Text='<%# Eval("ParentJobItemId") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, Job %>" DataField="DisplyName"
                            SortExpression="DisplyName" AllowFiltering="true" UniqueName="DisplyName" Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblJob" Text='<%# Eval("DisplyName") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:ManageResource, Barcode %>"
                            DataField="BarcodeImageUrl" SortExpression="BarcodeImageUrl" AllowFiltering="false"
                            UniqueName="BarcodeImageUrl" Visible="false">
                            <ItemStyle HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Image ID="imgBarcode" runat="server" Height="1%" Width="100%" />
                            </ItemTemplate>
                            <ItemStyle Wrap="False" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, ItemBarcode %>"
                            DataField="ItemBarcode" SortExpression="ItemBarcode" AllowFiltering="true" UniqueName="ItemBarcode"
                            Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:LinkButton runat="server" ID="lblItemBarcode" Text='<%# Eval("ItemBarcode") %>'></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left " />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, MakeModelSerial %>"
                            DataField="DisplayMakeModelSerial" UniqueName="DisplayMakeModelSerial" Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblDisplayMakeModelSerial" Text='<%# Eval("DisplayMakeModelSerial") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, CategoryName %>"
                            DataField="CategoryName" SortExpression="CategoryName" AllowFiltering="true"
                            UniqueName="CategoryName" Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblCategoryName" Text='<%# Eval("CategoryName") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, Quantity %>"
                            DataField="Quantity" SortExpression="Quantity" AllowFiltering="true" UniqueName="Quantity"
                            Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblQuantity" Text='<%# Eval("Quantity") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Right" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, ReturnFromClient %>"
                            DataField="ReturnFromClient" UniqueName="ReturnFromClient" Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblReturnFromClient" Text='<%# Eval("ReturnFromClient") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, ItemGroupName %>"
                            DataField="ItemGroupName" SortExpression="ItemGroupName" AllowFiltering="true"
                            UniqueName="ItemGroupName" Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblItemGroupName" Text='<%# Eval("ItemGroupName") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, ItemRoomName %>"
                            DataField="ItemRoomName" SortExpression="ItemRoomName" AllowFiltering="true"
                            UniqueName="ItemRoomName" Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblItemRoomName" Text='<%# Eval("ItemRoomName") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, ItemRoomBarcode %>"
                            DataField="ItemRoomBarcode" SortExpression="ItemRoomBarcode" AllowFiltering="true"
                            UniqueName="ItemRoomBarcode" Visible="false">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblItemRoomBarcode" Text='<%# Eval("ItemRoomBarcode") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, LocationName %>"
                            DataField="LocationName" SortExpression="LocationName" AllowFiltering="true"
                            UniqueName="LocationName" Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblLocationName" Text='<%# Eval("LocationName") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, ItemStatus %>"
                            DataField="DisplayContentStatus" SortExpression="StatusName" AllowFiltering="true"
                            UniqueName="DisplayContentStatus" Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblDisplayContentStatus" Text='<%# Eval("DisplayContentStatus") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="<%$ Resources:SearchJobItem, ProductionStatus %>"
                            DataField="DisplayProductionStatus" SortExpression="JobItemProductionStatus"
                            AllowFiltering="true" UniqueName="DisplayProductionStatus" Visible="true">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblProductionStatus" Text='<%# Eval("DisplayProductionStatus") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Wrap="True" HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                    </Columns>
                    <NoRecordsTemplate>
                        <asp:Label runat="server" ID="Label1" SkinID="lblradGridEmptyText" Text="<%$ Resources:iCatConstant, NoRecordsFound%>"></asp:Label>
                    </NoRecordsTemplate>
                </MasterTableView>
            </telerik:RadGrid>
  5. Answer
    Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 27 Oct 2010 Link to this post

    Hello Brijesh,

    To avoid the appearance of empty column you should set HeaderStyle-Width property for the columns. Note that when scrolling is enabled and UseStaticHeaders is True, the grid columns should declare HeaderStyle.Width. See this help article for more information.

    However, I take the provided code and prepared a simple working project. I used HeaderStyle-Width property of the MasterTableView to declare width of the columns. Please check it out and let me know if it helps.
     
    Regards,
    Pavlina
    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
  6. Sunil
    Sunil avatar
    230 posts
    Member since:
    Jan 2004

    Posted 24 Oct 2012 Link to this post

    Hello Brijesh,

    I was having the same problem and did everything advised by Telerik support, but still kept getting the extra space at end in a frozen columns grid.
    I solved it by going to Tools > Compatibility View in my IE 8 browser. Then the page automatically re-loaded and the empty space just vanished by itself. You could also set all websites to show in Compatibility View by going to Tools > Compatibility View Settings in IE 8 browser, and checking 'Display all websites in Compatibility View'.
    NOTE: However, in Firefox or Chrome, I never saw this problem after following Telerik's advice, but in IE 8 it kept on showing till I did what I have described in above paragraph.

    Thanks
    Sunil
  7. Kamal
    Kamal avatar
    34 posts
    Member since:
    Jan 2013

    Posted 13 May 2015 Link to this post

    Hi

    I'm troubled a lot with this strange problem in one of my ASPX page.

    Background, in all pages including this one, the columns are resizable and reorderable and I have got this GridSettingsPersister.SaveSettings() for all pages to retain the user preferences.In all these pages I'm using inbuilt GridEditCommandColumn.

    In problem page, I'm using GridTemplateColumn as first column that has a link to open custom edit pop up.

    Now the problem is that when I reorder the column and save setting by gsPersister and redirect and then come back to the page; that GridTemplateColumn with edit link is gone, like it did not existed at all.

    Please help.

    The aspx code:

     

    <div id="divlistInUsers">
                                <telerik:RadGrid ID="RGSiteConfig" runat="server" AllowPaging="True" AllowSorting="True"
                                    AutoGenerateColumns="False"
                                    OnNeedDataSource="RGSiteConfig_NeedDataSource" OnInsertCommand="RGSiteConfig_InsertCommand"
                                    OnItemDataBound="RGSiteConfig_ItemDataBound" OnItemCommand="RGSiteConfig_ItemCommand"
                                    OnPreRender="RGSiteConfig_PreRender"
                                    AllowFilteringByColumn="true" EnableLinqExpressions="false"
                                    Skin="Silk"
                                    PageSize="10" Width=""
                                    HeaderStyle-Font-Bold="true"
                                    AlternatingItemStyle-BackColor="#f0f0f0">

                                    <GroupingSettings CaseSensitive="false" />

                                    <PagerStyle Mode="NextPrevAndNumeric" />

                                    <MasterTableView CommandItemDisplay="Top" DataKeyNames="SiteID"
                                        InsertItemPageIndexAction="ShowItemOnFirstPage" CommandItemSettings-ShowRefreshButton="false">
                                        <Columns>
                                            <%--<telerik:GridTemplateColumn HeaderStyle-Width="10px" AllowFiltering="false" AllowSorting="false"
                                                Resizable="true" Reorderable="false">
                                                <ItemTemplate>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderStyle-Width="40px" Resizable="false" Reorderable="false" />--%>
                                            
                                            <telerik:GridTemplateColumn HeaderStyle-Width="40px" AllowFiltering="false" AllowSorting="false"
                                                Resizable="true" Reorderable="false">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnkEdit" runat="server" Text="Edit"
                                                        CommandArgument='<%# Eval("SiteID").ToString() + "," + Eval("ContractorID").ToString()
                                                            + "," + Eval("CountryOfOrigin").ToString() + "," + Eval("SiteIsActive").ToString()
                                                            + "," + Eval("ContractorIsActive").ToString() + "," + Eval("CSIEnabled").ToString()
                                                            + "," + Eval("MCSInstalled").ToString() + "," + Eval("IsCM").ToString()%>'
                                                        CommandName="EditSiteConfig" CausesValidation="false" />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>

                                            <telerik:GridBoundColumn SortExpression="SiteName" DataField="SiteName" HeaderText="MCS Site Name"
                                                HeaderStyle-Width="150" />

                                            <telerik:GridTemplateColumn HeaderText="Mapped PSA Companies" AllowFiltering="false" AllowSorting="false" HeaderStyle-Width="150">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblAssignTCACompanies" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "NoOfTCAs")%>' />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>

                                            <telerik:GridTemplateColumn SortExpression="Total" HeaderText="Users(UPM/CP)" Visible="true"
                                                AllowFiltering="false" HeaderStyle-Width="100">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblAssignOperatorsToSite" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "NoOfOperators") + "/" + DataBinder.Eval(Container.DataItem, "NoOfCPUsers")%>' />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>

                                            <telerik:GridTemplateColumn SortExpression="NoOfPermissions" HeaderText="Permissions" DataField="NoOfPermissions"
                                                AllowFiltering="false" HeaderStyle-Width="100">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblAssignPermissionsToSite" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "NoOfPermissions")%>' />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>

                                            <telerik:GridTemplateColumn HeaderText="CM Contacts" AllowFiltering="false" AllowSorting="false" HeaderStyle-Width="150">
                                                <ItemTemplate>
                                                    <p id="pCMContacts" runat="server" />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="Ciena Program Managers" AllowFiltering="false" AllowSorting="false" HeaderStyle-Width="150">
                                                <ItemTemplate>
                                                    <p id="pCienaContacts" runat="server" />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="CM Security Forms" AllowFiltering="false" AllowSorting="false"
                                                HeaderStyle-Width="105">
                                                <ItemTemplate>
                                                    <asp:DataGrid ID="gvattachments" runat="server" AutoGenerateColumns="false" ShowHeader="false"
                                                        GridLines="None" BorderWidth="0">
                                                        <HeaderStyle Font-Bold="True" />
                                                        <Columns>
                                                            <asp:HyperLinkColumn DataTextField="AttachmentName" HeaderText="Files"
                                                                DataNavigateUrlField="AttachmentID" DataNavigateUrlFormatString="DownloadFile.aspx?Attachmentid={0}" />
                                                        </Columns>
                                                    </asp:DataGrid>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="CM IP Address" AllowFiltering="false" AllowSorting="false" HeaderStyle-Width="120">
                                                <ItemTemplate>
                                                    <asp:DataGrid ID="gvip" runat="server" AutoGenerateColumns="false" ShowHeader="false"
                                                        GridLines="None" BorderWidth="0">
                                                        <HeaderStyle Font-Bold="True" />
                                                        <Columns>
                                                            <asp:HyperLinkColumn DataNavigateUrlField="IPAddress" DataTextField="IPAddress"
                                                                DataNavigateUrlFormatString="http://whatismyipaddress.com/ip/{0}"
                                                                HeaderText="IP Address" Target="_blank" />
                                                        </Columns>
                                                    </asp:DataGrid>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridBoundColumn SortExpression="CountryOfOrigin" DataField="CountryOfOrigin" HeaderText="Country"
                                                HeaderStyle-Width="150" />
                                            <telerik:GridBoundColumn DataField="SiteIsActive" HeaderText="Active [Uses MCS UDC]" HeaderStyle-Width="110" />
                                            <telerik:GridBoundColumn DataField="ContractorIsActive" HeaderText="Uses LS Web" HeaderStyle-Width="70" />
                                            <telerik:GridBoundColumn DataField="CSIEnabled" HeaderText="Uses CSI App" HeaderStyle-Width="80" />
                                            <telerik:GridBoundColumn DataField="MCSInstalled" HeaderText="Uses MCS Client" HeaderStyle-Width="85" />

                                            <telerik:GridTemplateColumn SortExpression="NoOfGroups" HeaderText="Groups" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblAssignGroupsToSite" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "NoOfGroups")%>' />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>

                                            <telerik:GridBoundColumn SortExpression="ModifiedBy" DataField="ModifiedBy" HeaderText="Updated By" HeaderStyle-Width="150" />
                                            <telerik:GridBoundColumn SortExpression="ModifiedTime" DataField="ModifiedTime" HeaderText="Updated Date"
                                                DataFormatString="{0:d-MMM-yyyy hh:mm tt}" AllowFiltering="false" />

                                            <telerik:GridTemplateColumn HeaderStyle-Width="145px" AllowFiltering="false" AllowSorting="false"
                                                Resizable="false" Reorderable="false" HeaderText="Export CM Details">
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="lnkExportInGrid" runat="server" Text="Export CM Details"
                                                        NavigateUrl='<%# Eval("SiteID", "~/DownloadFile.aspx?SiteID={0}")%>' Target="_blank" />
                                                    <input runat="server" type="hidden" id="hdTotal" value='<%# DataBinder.Eval(Container.DataItem, "Total")%>' />
                                                    <input runat="server" type="hidden" id="hdNoOfIPs" value='<%# DataBinder.Eval(Container.DataItem, "NoOfIPs")%>' />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>

                                            <telerik:GridBoundColumn SortExpression="SiteID" HeaderText="Site ID"
                                                DataField="SiteID" AllowFiltering="false" />

                                        </Columns>
                                        <EditFormSettings EditFormType="Template" CaptionFormatString="Add/Edit Site"
                                            FormCaptionStyle-Font-Bold="true">
                                            <PopUpSettings Width="555px" Modal="true" />
                                            <FormTemplate>

                                                <table cellpadding="2" cellspacing="5" border="0" width="100%" rules="none"
                                                    style="border-collapse: collapse;">
                                                    <tr>
                                                        <td>Site ID</td>
                                                        <td>
                                                            <asp:Label ID="lblSiteID" runat="server" Text='<%# Bind("SiteID")%>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Contractor ID</td>
                                                        <td>
                                                            <asp:Label ID="lblContractorID" runat="server" Text='<%# Bind("ContractorID")%>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>MCS Site Name</td>
                                                        <td>
                                                            <asp:TextBox ID="txtSiteName" runat="server" Text='<%# Bind("SiteName")%>'
                                                                MaxLength="50" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Country</td>
                                                        <td>
                                                            <asp:DropDownList ID="lbCountryCode" runat="server" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Active [Uses MCS UDC]</td>
                                                        <td>
                                                            <asp:CheckBox ID="chkSiteActive" runat="server" Enabled="false"
                                                                Checked='<%# (DataBinder.Eval(Container.DataItem, "SiteIsActive") == DBNull.Value ? true : Eval("SiteIsActive"))%>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Uses LS Web</td>
                                                        <td>
                                                            <asp:CheckBox ID="chkContractorActive" runat="server" Enabled="false"
                                                                Checked='<%# (DataBinder.Eval(Container.DataItem, "ContractorIsActive") == DBNull.Value ? true : Eval("ContractorIsActive"))%>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Uses CSI App</td>
                                                        <td>
                                                            <asp:CheckBox ID="chkCSIEnabled" runat="server"
                                                                Checked='<%# (DataBinder.Eval(Container.DataItem, "CSIEnabled").ToString() == "True" ? true : false)%>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Uses MCS Client</td>
                                                        <td>
                                                            <asp:CheckBox ID="chkMCSInstalled" runat="server"
                                                                Checked='<%# (DataBinder.Eval(Container.DataItem, "MCSInstalled").ToString() == "True" ? true : false)%>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <input runat="server" type="hidden" id="hdSiteName" value='<%# Bind("SiteName")%>' />
                                                            <input runat="server" type="hidden" id="hdCountry" value='<%# Bind("CountryOfOrigin")%>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2" style="height: 20px;">
                                                            <asp:Label ID="lblError1" ForeColor="Red" runat="server"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Button ID="btnUpdate" Text="Insert" runat="server" CommandName="PerformInsert"
                                                                CausesValidation="false" CssClass="button"></asp:Button>
                                                            <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="false"
                                                                CommandName="Cancel" CssClass="button"></asp:Button>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </FormTemplate>
                                        </EditFormSettings>
                                    </MasterTableView>
                                    <ClientSettings AllowColumnsReorder="true" ColumnsReorderMethod="Reorder" ReorderColumnsOnClient="true">
                                        <ClientEvents OnRowDblClick="" OnPopUpShowing="onPopUpShowing" />
                                        <Resizing AllowRowResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True"
                                            AllowColumnResize="True" />
                                    </ClientSettings>
                                </telerik:RadGrid>
                            </div>

     

  8. Kamal
    Kamal avatar
    34 posts
    Member since:
    Jan 2013

    Posted 13 May 2015 Link to this post

    Hello Team

    Please help me with this. I cannot figure out why my Custom(TemplateColumn) Edit Column is lost when I save the Grid Settings and revisit the page. I have other custom Template Columns as well with hyperlinks, which stay intact.

    Thanks

    Kamal

  9. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 15 May 2015 Link to this post

    Hello,

    Could you confirm that the same problem persists when you are using Persistence Framework? A live example where this framework is used to persists the grid settings is available here:
    http://demos.telerik.com/aspnet-ajax/controls/examples/integration/persisting-grid-settings/defaultcs.aspx?product=grid

    Additionally, if this not helps send us the code behind of the problematic page.

    Regards,
    Pavlina
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017