Remove Border RadGrid in RadWindow

2 posts, 0 answers
  1. Sanji
    Sanji avatar
    7 posts
    Member since:
    Nov 2019

    Posted 27 Mar Link to this post

    Hi All,

     

    I have RadGrid inside RadWindow, i want to remove border on RadGrid. Any have solution..? 

     

    This my RadWindow Code
    <telerik:RadWindow ID="RwEmployeeBrowser" runat="server" Modal="true" Width="1200px" Height="550px" KeepInScreenBounds="true" Title="Select Employee">
        <ContentTemplate>
            <UC:UCEmploye ID="UCEmploye" runat="server" />
        </ContentTemplate>
    </telerik:RadWindow>
     
    This My RadGridCode
    <telerik:RadGrid RenderMode="Lightweight" ID="RgData" PagerStyle-AlwaysVisible="true" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellSpacing="-1" GridLines="Both" OnPreRender="RgData_PreRender" OnItemCommand="RgData_ItemCommand" OnItemDataBound="RgData_ItemDataBound"  OnNeedDataSource="RgData_NeedDataSource">
                        <GroupingSettings CaseSensitive="false" />
                        <MasterTableView CommandItemDisplay="Top" Width="100%" AllowMultiColumnSorting="false">
                            <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="false" ShowRefreshButton="false" />
                            <Columns>
                                <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderStyle-Width="2px">
                                    <FilterTemplate>
                                        <asp:ImageButton ID="btnClearFilter" CausesValidation="false" runat="server" ImageUrl="/Style Library/bower_components/Telerik/Delete.gif" AlternateText="Clear Filter"
                                            ToolTip="Clear Filter" OnClick="btnClearFilter_Click" Style="vertical-align: middle" />
                                    </FilterTemplate>
                                    <ItemTemplate>
                                        <asp:LinkButton runat="server" ID="ImgBtn" Text="Select" ForeColor="Blue" CausesValidation="false" CommandName="Select" />
                                        <asp:Label runat="server" ID="lblId" Text='<%# Eval( "PersonId" ) %>' Visible="false"></asp:Label>
                                        <asp:Label runat="server" ID="lblEmpLogin" Text='<%# Eval( "EmployeeLogin" ) %>' Visible="false"></asp:Label>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="No" AllowFiltering="false">
                                    <ItemTemplate>
                                        <asp:Label ID="numberLabel" runat="server" />
                                    </ItemTemplate>
                                    <HeaderStyle Width="15px" />
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Left" AutoPostBackOnFilter="true" UniqueName="Un1" FilterControlWidth="100%" DataField="EmployeeNumber" HeaderText="NIK" HeaderStyle-Width="10%" CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderButtonType="TextButton">
                                    <HeaderStyle Width="10%"></HeaderStyle>
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Left" AutoPostBackOnFilter="true" UniqueName="Un2" FilterControlWidth="100%" DataField="EmployeeName" HeaderText="Employee Name" HeaderStyle-Width="30%" CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderButtonType="TextButton">
                                    <HeaderStyle Width="15%"></HeaderStyle>
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Left" AutoPostBackOnFilter="true" UniqueName="Un3" FilterControlWidth="100%" DataField="Position" HeaderText="Position" HeaderStyle-Width="30%" CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderButtonType="TextButton">
                                    <HeaderStyle Width="25%"></HeaderStyle>
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Left" AutoPostBackOnFilter="true" UniqueName="Un4" FilterControlWidth="100%" DataField="DepartmentName" HeaderText="Department" HeaderStyle-Width="30%" CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderButtonType="TextButton">
                                    <HeaderStyle Width="25%"></HeaderStyle>
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Left" AutoPostBackOnFilter="true" UniqueName="Un5" FilterControlWidth="100%" DataField="CompanyName" HeaderText="Company" HeaderStyle-Width="30%" CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderButtonType="TextButton">
                                    <HeaderStyle Width="25%"></HeaderStyle>
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings Selecting-AllowRowSelect="false" EnablePostBackOnRowClick="false" EnableRowHoverStyle="false">
                            <Resizing AllowColumnResize="false" ResizeGridOnColumnResize="false" AllowResizeToFit="false" />
                        </ClientSettings>
                        <HeaderStyle HorizontalAlign="Center" />
                        <FilterMenu RenderMode="Lightweight"></FilterMenu>
                        <HeaderContextMenu RenderMode="Lightweight"></HeaderContextMenu>
                    </telerik:RadGrid>
  2. Doncho
    Admin
    Doncho avatar
    74 posts

    Posted 31 Mar Link to this post

    Hello Sanji,

    Depending on the appearance you wish to achieve here are some suggestions to try

    • To remove predefined borders and Gridlines, see How to Add or Remove RadGrid Borders.
    • For Grid precisely fitting in the RadWindow or If you just want to remove the outer applied border of the RadGrid you can use custom CSS styles applied on the rendered HTML elements, see HTML Output

    If my suggestions do not represent the scenario, please share more details about the border you want to remove. More detailed descriptions, or screenshots, record a video, etc. would be very useful.

    Kind regards,
    Doncho
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top