This is a migrated thread and some comments may be shown as answers.

Is There A Way to Put Something to Replace a Footer?

4 Answers 9 Views
VirtualGrid
This is a migrated thread and some comments may be shown as answers.
Marianne
Top achievements
Rank 1
Veteran
Marianne asked on 19 May 2020, 04:10 PM
The documentation makes no mention of a footer in a virtual grid.  Is it possible to put lets's say a label or some other control under the grid - to give a record count after filtering, for example.

4 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 20 May 2020, 05:00 AM

Hello, Marianne,  

In order to simulate a footer in RadVirtualGrid, you can use the following code snippet which result is illustrated in the below screenshot: 

            LightVisualElement footerElement = new LightVisualElement();
            footerElement.StretchVertically = false;
            footerElement.Alignment = ContentAlignment.BottomCenter;
            footerElement.BackColor = Color.LightBlue;
            footerElement.DrawFill = true;
            footerElement.GradientStyle = GradientStyles.Solid;
            footerElement.Text = "This is my footer";
            this.radVirtualGrid1.VirtualGridElement.Children.Add(footerElement);
            this.radVirtualGrid1.TableElement.Margin = new Padding(0, 0, 0, 20);

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
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.
0
Marianne
Top achievements
Rank 1
Veteran
answered on 20 May 2020, 01:37 PM
my application is using the Desert theme so I didn't put in the BackColor.
0
atfat
Top achievements
Rank 1
Iron
answered on 07 Nov 2020, 04:47 AM

hello  Dess

is there any way to set the footerElement height size and align the text to left for example

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Nov 2020, 11:48 AM

Hello, Atfat, 

In order to align the text and increase the height for the footer element, you can have a look at the following modified code snippet:

            LightVisualElement footerElement = new LightVisualElement();

            int height = 40;
            footerElement.TextAlignment = ContentAlignment.MiddleLeft;
            footerElement.MinSize = new System.Drawing.Size(0, height);

            footerElement.StretchVertically = false;
            footerElement.Alignment = ContentAlignment.BottomCenter;
            footerElement.BackColor = Color.LightBlue;
            footerElement.DrawFill = true;
            footerElement.GradientStyle = GradientStyles.Solid;
            footerElement.Text = "This is my footer";
            this.radVirtualGrid1.VirtualGridElement.Children.Add(footerElement);
            this.radVirtualGrid1.TableElement.Margin = new Padding(0, 0, 0, height);

Should you have further questions please let me know.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
VirtualGrid
Asked by
Marianne
Top achievements
Rank 1
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Marianne
Top achievements
Rank 1
Veteran
atfat
Top achievements
Rank 1
Iron
Share this question
or