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

Custom Position of Add/Create link

4 Answers 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
MiracleMan
Top achievements
Rank 1
MiracleMan asked on 14 Sep 2015, 09:54 PM

Hello, I'm currently evaluating the MVC controls. I've created a custom control panel where the user can filter  or create new items on the table.  Currently the filter is working perfectly using javascript. The create button is not.  I added the class k-grid-add but no luck. I look at the link the grid creates when using the standard create button in the toolbar and it looks something like this: tblAgents_Read?grid-mode=insert  . I've tried adding this link to my custom link but it will return all data in a json file.  Any help?

 

4 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 15 Sep 2015, 03:50 PM
Hi,

Would you try the approach suggested in the following thread and see how it works for you?


In case the behavior persists please share the definition for the grid widget.


Regards,
Viktor Tachev
Telerik
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
0
MiracleMan
Top achievements
Rank 1
answered on 15 Sep 2015, 08:13 PM
But this code is to create a custom Toolbar. I don't want to use a toolbar because we need the controls at another location. 
0
Accepted
Viktor Tachev
Telerik team
answered on 16 Sep 2015, 02:57 PM
Hi,

In order to add new record to the grid with an external button you can use an approach similar to the following:


<button  onclick='createRow(); return false;'>
    add new row
</button>


function createRow() {
    grid = $("#Grid").data("kendoGrid");
    grid.addRow();
}



Regards,
Viktor Tachev
Telerik
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
0
MiracleMan
Top achievements
Rank 1
answered on 17 Sep 2015, 12:06 AM
Yes. That worked!!! Thanks.
Tags
Grid
Asked by
MiracleMan
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
MiracleMan
Top achievements
Rank 1
Share this question
or