4 Answers, 1 is accepted
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
Our thoughts here at Progress are with those affected by the outbreak.
hello Dess
is there any way to set the footerElement height size and align the text to left for example
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/.