This is a migrated thread and some comments may be shown as answers.
Adding a new item programmatically
1 Answer 100 Views
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 28 Feb 2020, 08:09 PM

Hi there,

I need the same fuctionality of the "Add" command of the grid's toolbar but using a button located anywhere in the page. Is this possible?

 

<GridToolBar>
   <GridCommandButton Command="Add" Icon="add">Add Item</GridCommandButton>
</GridToolBar>

Thank you.

1 Answer, 1 is accepted

Sort by
0
Svetoslav Dimitrov
Telerik team
answered on 02 Mar 2020, 01:06 PM

Hello Richard,

There are a few ways to approach that:

  • There is a thread in our Feedback Portal (link here) for a feature request that might suit your needs. If public methods for controlling the grid are implemented you will be able to invoke them from buttons anywhere on the page. I have given your Vote for it. You could also Follow it in order to receive email notifications for future status updates.
  • Another way of doing it is to use a custom form for editing or adding (for examples click here and here).
  • A third way could be by relocating the GridCommandButton "Add" by surrounding it in a div and use the position CSS property to put it anywhere on the page where you require. Here is a short sample:
    <GridToolBar>
            <div style="position:*position options*>
                <GridCommandButton Command="Add" Icon="add">Add Item</GridCommandButton>
            </div>
    </GridToolBar>

If neither of these work for you or require any further assistance, please do not hesitate to contact us. 

Regards,
Svetoslav Dimitrov
Progress Telerik

 UI for Blazor

Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Svetoslav Dimitrov
Telerik team
Share this question
or