File Explorer's Grid Control Height Problem

2 posts, 1 answers
  1. Digant
    Digant avatar
    13 posts
    Member since:
    Dec 2013

    Posted 24 Dec 2013 Link to this post

    Hello Friends 

    I want to set height of Grid HeaderStyle  and ItemStyle(row)

    .aspx code

    /* CSS */
     <style type="text/css">
            div.RadToolBar .rtbUL
            {
                width: 100%;
                height: 20px;
            }

            div.RadToolBar_Default .rtbTemplate
            {
                margin-left: 450px;
                margin-top: 0px;
            }

            div.RadFileExplorer .RadGrid .rgRow TD
            {
                height: 10px;
                margin-bottom: 0px;
                margin-top: 0px;
            }

            .RadGrid_Web20 .rgRow TD
            {
                font-size: 10px;  /*  You can set size of font  */
                height: 5px;
            }

            .RadGrid_Web20 .rgRow TR
            {
                height: 8px;
            }

            .RadGrid_Web20 .rgRow
            {
                height: 8px;
            }

            .RadGrid_Web20 .rgHeader
            {
                height: 12px;
            }
        </style>

    /* Telerik control */

      <telerik:RadFileExplorer runat="server" ID="FileExpDocument" TreePaneWidth="0px" Height="180px" Width="98%"
                                                                    OnExplorerPopulated="FileExpDocument_ExplorerPopulated" EnableCreateNewFolder="true" EnableOpenFile="true" DisplayUpFolderItem="true"
                                                                    EnableCopy="true"
                                                                    ViewStateMode="Enabled" OnClientLoad="ClientLoad">
                                                                    <Configuration ViewPaths="~/TempImage" UploadPaths="~/TempImage"
                                                                        DeletePaths="~/TempImage" EnableAsyncUpload="true" MaxUploadFileSize="1024000" SearchPatterns="*.*"></Configuration>
                                                                    <KeyboardShortcuts NewFolder="CTRL + 5" Open="CTRL + 3" Refresh="CTRL + 4" UploadFile="CTRL + U" Back="CTRL + 1" Forward="CTRL + 2" />
                                                                </telerik:RadFileExplorer>


    .CS code

    //Set Grid properties

     FileExpDocument.Grid.Skin = "Web20";
            FileExpDocument.ListView.Skin = "Web20";

            //FileExpDocument.
            //FileExpDocument.Grid.CssClass="

            //GridHeaderItem header = FileExpDocument.Grid.he.FindByUniqueNameSafe("DocumentCategory");

            FileExpDocument.Grid.HeaderStyle.Height = 15; //it take minimum 15 but when i set to 10 height remain same
            //FileExpDocument.Grid.HeaderStyle.Font.Bold;
            FileExpDocument.Grid.ItemStyle.Height = 5;  // it  not take 5

            FileExpDocument.Grid.CellPadding = 0;
            FileExpDocument.Grid.CellSpacing = 0;


    /////////////////*********/////////////////////

    I have upload two image so you can get more idea what i exactly want


    Thanks in advance 






  2. Answer
    Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 27 Dec 2013 Link to this post

    Hi Digant,

    You can further customize the appearance of the FileExplorer control by setting custom CSS rules. To get more information about the predefined CSS classes, you can follow this help article.

    Additionally, the desired stylization could be achieved with the following example rules:
    /*Item elements*/
    .RadFileExplorer .RadGrid td {
        height:26px;
    }
     
    /*Header elements*/
    .RadFileExplorer .RadGrid thead tr {
        height:36px;
    }


    Regards,
    Ianko
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top