Click here to Skip to main content
14,972,394 members

Comments by atulonweb@gmail.com (Top 5 by date)

atulonweb@gmail.com 27-Nov-15 4:55am View
   
Thank you very much for such kind words sir. Your reply really motivated me for putting question anywhere.

I admit I am stupid enough to not to understand these topics.

Anyway I am obliged that you took your precious time for writing such kind words.

I will for sure follow your advise.

Thank you,
Atul
atulonweb@gmail.com 27-Nov-15 3:56am View
   
Finally I achieved that using RESTSharp and locally maintaining db for token.
atulonweb@gmail.com 8-Sep-15 7:38am View
   
sorry aarif if it is not clear.. I have updated the question
atulonweb@gmail.com 7-Sep-15 4:31am View
   
@model ProductModel

@if (Model.Id > 0)
{

<table class="adminContent">
<tr>

<td>
<div id="productmanufacturers-grid"></div>
<script>
$(document).ready(function () {
$("#productmanufacturers-grid").kendoGrid({
dataSource: {
type: "json",
transport: {
read: {
url: "@Html.Raw(Url.Action("ProductCustomPriceModelList", "Product", new { productId = Model.Id }))",
type: "POST",
dataType: "json",
data: addAntiForgeryToken
},
create: {
url: "@Html.Raw(Url.Action("ProductManufacturerInsert", "Product", new { productId = Model.Id }))",
type: "POST",
dataType: "json",
data: addAntiForgeryToken
},
update: {
url:"@Html.Raw(Url.Action("ProductCustomPriceModelUpdate", "Product"))",
type: "POST",
dataType: "json",
data: addAntiForgeryToken
},
destroy: {
url: "@Html.Raw(Url.Action("ProductCustomPriceModelDelete", "Product"))",
type: "POST",
dataType: "json",
data: addAntiForgeryToken
}
},
schema: {
data: "Data",
total: "Total",
errors: "Errors"
},
requestEnd: function (e) {
if (e.type == "create" || e.type == "update") {
this.read();
}
},
error: function (e) {
display_kendoui_grid_error(e);
// Cancel the changes
this.cancelChanges();
},
serverPaging: true,
serverFiltering: true,
serverSorting: true
},
pageable: {
refresh: true,
numeric: false,
previousNext: false,
info: false
},
toolbar: ["create"],
edit: function(e) {
if (e.model.isNew()) {
//little hack here
//pre-select the first value of kendoui dropdownlist datasource
//for some reasons (maybe, bug) it always sends 0
//if no value has been selected (changed) in the dropdownlist
if (allManufacturers.length > 0) {
e.model.ManufacturerId = allManufacturers[0].Id;
}
}
},
editable: {
confirmation: false,
mode: "inline"
},
scrollable: false,
columns: [{
field: "CurrencyId",
title: "@T("Admin.Catalog.Products.Manufacturers.Fields.Manufacturer")",
width: 200
},

{
field: "CurrencyId",
title: "@T("Admin.Catalog.Products.Manufacturers.Fields.DisplayOrder")",
width: 200,
//integer format
format: "{0:0}"
}, {
command: [{
name: "edit",
text: "@T("Admin.Common.Edit")"
}, {
name: "destroy",
text: "@T("Admin.Common.Delete")"
}],
width: 200
}]
});
});

</script>
</td>
</tr>
</table>
}
else
{
@T("Admin.Catalog.Products.AssociatedProducts.SaveBeforeEdit")
}
atulonweb@gmail.com 7-Sep-15 4:15am View
   
Hi,I have posted entire code of my MVC view but seems it has size limit. Share I share it with you?

Edit link in my kendo grid is not converting row in to editable.