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

internet explorer prompts to open or save the file when i click on Custom insert button which is integrated with grid

1 Answer 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 16 Apr 2013, 07:34 PM
My insert button inside Ajax.beginform().
<div id="createDescriptors">
@using (Ajax.BeginForm(

"InsertDescriptors",
new { id = Model.CitationID},

new AjaxOptions()
{

UpdateTargetId = "createDescriptors",
HttpMethod = "post",


}


) )

{

<div class="grid">
<div class="row gridRow">
<div class="span1">
<input type="image" id="btnInsertDes" src="~/Content/Icons/Add.png">
Insert
</div>
<div class="span1">
<input type="image" id="btnEditDes" src="~/Content/Icons/Edit.png" >
Edit
</div>
<div class="span1">
<input type="image" id="btnDeleteDes" src="~/Content/Icons/Delete.png">
Delete
</div>
<div class="span1">
<input type="image" id="btnSaveDes" src="~/Content/Icons/Save.png" >
Save
</div>

</div>
</div>
 
and here is my controller Action method:
public JsonResult InsertDescriptors([DataSourceRequest] DataSourceRequest request, CitationDescriptor citationDescriptor, int id)
{

citationDescriptor.CitationID = id;
citationDescriptor.DBProviderID = 1;

if( citationDescriptor != null && (ModelState.IsValid))
{
Db.Descriptors.Add(citationDescriptor);
Db.SaveChanges();
}

return Json(new[] { citationDescriptor }.ToDataSourceResult(request, ModelState), "application/json");


}

Thanks for your help!
VANDANA

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 18 Apr 2013, 01:04 PM
Hello Greg,

It is not getting clear what is the issue that you experience. Describe in more details and if possible create a jsbin to demonstrate the case.

Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Greg
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or