Load background image of grid.

Posted by: damianrm-fp on 8 September 2017, 2:09 pm EST

  • Posted 8 September 2017, 2:09 pm EST

    Dear FarPoint Team


    After 30 min. searching I give up and decide to ask you. Look pic.1 with you grid. It look ok, but I want to make it look better and for this I want to put background picture over you grid in space where have no rows. Like is show on second pic.

      Or if not possible to load image, at least from where I to change this color ?

     Or watermark (same background but over all grid). How to do this ?

    I use this code, it not produce error but ir replace colur in row with text. I want to add this backgorund in free of rows space as is show on pic.

                grd.BackgroundImageLayout = ImageLayout.Stretch;

                grd.BackgroundImage = System.Drawing.Image.FromFile(@Application.StartupPath + \\grd_backgroud.jpg);

    grd.ActiveSheet.DefaultStyle.BackColor = Color.FromArgb(10);

  • Replied 8 September 2017, 2:09 pm EST

    Hello DamianRM,

    It is not possible to set the image in the gray area i.e. area between the sheet and the edge of the control. But we can set the color of the gray area using the code given as follows:

    fpSpread1.InterfaceRenderer = null;
    fpSpread1.Sheets[0].GrayAreaBackColor = Color.Coral;

    Here you need to set the InterfaceRenderer to null else you do not see the GrayAreaBackColor since the InterfaceRenderer paints the color for that part of the Spread based on it's settings.

    Hope this will help. Thanks.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels