Custom toolbar for Gridview

2 posts, 0 answers
  1. sriparthu
    sriparthu avatar
    3 posts
    Member since:
    Jul 2011

    Posted 21 Jul 2015 Link to this post

    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.
  2. Dess
    Dess avatar
    2166 posts

    Posted 23 Jul 2015 Link to this post

    Hello Sriparthu,

    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
Back to Top