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

Custom toolbar for Gridview

1 Answer 152 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
sriparthu asked on 21 Jul 2015, 07:08 AM
Is there any sample available for building a custom toolbar on gridview to add / edit rows,insert, delete and print? Any pointers is much appreciated.

1 Answer, 1 is accepted

Sort by
Dess | Tech Support Engineer, Principal
Telerik team
answered on 23 Jul 2015, 01:09 PM
Hello ,

Thank you for writing.

There is no appropriate sample that I can suggest for your case. One possible solution is to create a UserControl and place RadGridView and all the necessary toolbar elements in it. An alternative approach is to insert a  StackLayoutElement in the GridViewElement.GroupPanelElement. Here is a sample code snippet which result is illustrated on the attached screenshot:
StackLayoutElement stack = new StackLayoutElement();
RadButtonElement exportButton = new RadButtonElement();
exportButton.Text = "Export";
exportButton.Click += exportButton_Click;
RadButtonElement saveButton = new RadButtonElement();
saveButton.Text = "Save";
stack.Orientation = Orientation.Horizontal;
stack.StretchHorizontally = true;
stack.Margin = new Padding(0, 20, 0, 0);

Note that this is just a sample approach and it may not cover all possible cases. Feel free to modify it on a way which suits your requirement best.

I hope this information helps. Should you have further questions, I would be glad to help.
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question