Grid Back color

8 posts, 0 answers
  1. pierre-jean
    pierre-jean avatar
    59 posts
    Member since:
    Apr 2011

    Posted 13 Mar 2018 Link to this post

    How can I define the grid back color - the area in White in the attached screen shot of my test application ?

    Is it possible to set it as transparent - to display the backgrond image of the hosting form 

    Thanks in advance

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3201 posts

    Posted 13 Mar 2018 Link to this post

    Hello, Pierre-Jean,

    Thank you for writing.  

    According to the provided screenshot it seems that you increase the TableElement.RowSpacing. You can assign an image to the TableElement.BackgroundImage property. Thus, it will be visible in the space between the rows:
      
    public RadForm1()
    {
        InitializeComponent();
     
        this.radGridView1.TableElement.RowSpacing = 20;
        this.radGridView1.CellFormatting+=radGridView1_CellFormatting;
        this.radGridView1.TableElement.BackgroundImage = Properties.Resources.Nice;
        this.radGridView1.TableElement.BackgroundImageLayout = ImageLayout.Zoom;
    }
     
    private void radGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
    {
        e.CellElement.DrawFill = true;
        e.CellElement.BackColor = Color.Yellow;
        e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
    }



    I hope this information helps. Should you have further questions I would be glad to help. 
     
     Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. pierre-jean
    pierre-jean avatar
    59 posts
    Member since:
    Apr 2011

    Posted 13 Mar 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thanks for your message.

    It's not quite what I am looking for, I would like the row space to be transparent in order to see the image that is loaded as background of the form on which the grid is loaded, and not load the image on the grid itself.

    If I set a color to the radgrid tablelement (radgrid.tableElement.backcolor = color.red for instance), the space takes that color

    However if I set the tableElementbackcolor = color.transparent the space is not transparent and it becomes grey (probably "Control" color)

    in the attached screenshots I have at the left a screen copy with a fixed color and at the right a "transparent" color, whis is not transparent but shows a "grey"

    May be it is not possible to set this element transparent ...

    Thanks

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3201 posts

    Posted 15 Mar 2018 Link to this post

    Hello, Pierre-Jean,      

    Thank you for writing back. 

    In order to see the image applied to the form as BackgroundImage it is necessary to make the BackColor transparent not only for the TableElement, but also for the RadGridView.RootElement:
    this.BackgroundImage = Properties.Resources.Nice;
    this.radGridView1.TableElement.BackColor = Color.Transparent;
    this.radGridView1.RootElement.BackColor = Color.Transparent;

    I hope this information helps. If you have any additional questions, please let me know. 

     Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. pierre-jean
    pierre-jean avatar
    59 posts
    Member since:
    Apr 2011

    Posted 15 Mar 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Top

    thanks a lot for your Support

    Have a good day

    Regards

    PJ Pralong

  6. pierre-jean
    pierre-jean avatar
    59 posts
    Member since:
    Apr 2011

    Posted 15 Mar 2018 in reply to pierre-jean Link to this post

    One last question (if I may)

    How do Ii remove the grid border that remains after the backcolor is set to transparent ?

    I have tried tableelement.drawborder = false but it does no do the work ..

    Thanks

  7. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3201 posts

    Posted 15 Mar 2018 Link to this post

    Hello, Pierre-Jean, 

    Thank you for writing.  
     
    In order to remove the border around the grid, you can set the RadGridView.GridViewElement.DrawBorder property to false
    this.radGridView1.GridViewElement.DrawBorder = false;
      
    I hope this information helps. Should you have further questions I would be glad to help. 
     
     Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  8. pierre-jean
    pierre-jean avatar
    59 posts
    Member since:
    Apr 2011

    Posted 15 Mar 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thanks a lot

    Now I have everything as I wish

    Best Regards

Back to Top