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

Add a header to RadGridView with Add, Edit, Delete buttons

1 Answer 244 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 17 Nov 2016, 08:14 PM

I would like to add an Add, Edit and Delete buttons to the RadGridView, similar to what is seen in this ASP.NET Ajax control

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/commanditem/defaultcs.aspx

Is this possible in WinForms without too much hassle? I am not a fan of the current appearance of just having RadButtons above.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 18 Nov 2016, 01:02 PM
Hi Pavel,

The easiest way would be to add the buttons to the group panel:
private void RadButton1_Click(object sender, EventArgs e)
{
    radGridView1.GridViewElement.GroupPanelElement.Text = "";
    StackLayoutPanel panel = new StackLayoutPanel();
    panel.Orientation = Orientation.Horizontal;
    panel.StretchHorizontally = true;
 
    for (int i = 0; i < 10; i++)
    {
        RadButtonElement button = new RadButtonElement();
        button.Text = "test";
        panel.Children.Add(button);
    }
    radGridView1.GridViewElement.GroupPanelElement.Children.Add(panel);
}

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Telerik by Progress
Telerik UI for WinForms is ready for Visual Studio 2017 RC! Learn more.
Tags
GridView
Asked by
Pavel
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or