If I send like this data: {CusCode:'5555', MktID: "aa"}
0=%7B&1=C&2=u&3=s&4=C&5=o&6=d&7=e&8=%3A&9=%20&10='&11='&12=%2C&13=M&14=k&15=t&16=I&17=D&18=%3A&19=%20&20='&21=a&22=a&23='&24=%7D
When I Use AJAX
HOW TO USE like this data: "{Field:'',Text:'',page:1,rows:50000}" and don't enclipe my code
$.ajax({ type: "POST",
contentType: "application/json; charset=utf-8",
url: "Service.asmx/M_Portfolio_selMaster",
dataType: "json",
data: "{Field:'',Text:'',page:1,rows:50000}",
async: true,
success: function (response) {
var data = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d;
var tbl;
data = data.rows;
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
tbl += "<OPTION value='" + data[i]['PortfolioID'] + "'>" + data[i]['PortfolioCode'] + "</OPTION>";
}
$("#s").html(tbl);
}
}
});
$("#grid").kendoGrid({
dataSource: {
transport: {
read: {
// the remote service url
url: "wsCRM.asmx/crm_FinancialBenefitByCustomer", // GetBBGToADVTransactionsData is our web method
contentType: "application/json; charset=utf-8",
type: "POST",
// JSONP is required for cross-domain AJAX
dataType: "json",
// additional parameters sent to the remote service
data: {
CusCode:'5555',
MktID: "aa"
}
}
}
}
});
My Web service asp.net C#
[WebMethod(EnableSession = true)]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string crm_FinancialBenefitByCustomer(string CusCode,string MktID)
{
CRMDataContext dtx = new CRMDataContext();
var data = dtx.crm_FinancialBenefitByCustomer(CusCode, MktID, UserID).ToList();
JavaScriptSerializer js = new JavaScriptSerializer();
string strJSON = js.Serialize(data);
//strJSON = "{\"__count\":\"" + data.Count + "\" ,\"results\":" + strJSON + "}";
return strJSON;
}
Hi All
I'm trying to export the HTML table contents to grid, when I open the spreadsheet, the first column comes with unwanted characters, since it is a hyperlink <a> tag within the <TD> tag. Please refer the example below:
https://dojo.telerik.com/inOGITIL
Please let me know how this can be avoided.
Thanks
Vijhay Devarajan.
We have a media player which gives the following error: (the media player works but the console error is annoying)
www-widgetapi.js:99 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided (xxxx) does not match the recipient window's origin (yyyyy)
Is there some configuration I can change to enable this? The xxxx url is a youtube url with https at the begining
Thanks!
Hello
I am trying to save kendo PivotGrid state for future load but I can't find a way to save/load the selected feilds (slices) using the "Fields to Include" menu along side with rows,columns and measures.
Is there any way to get and set selected fields in kendo PivotGrid?
TreeList Column Resize work fine in ltr mode but it doesn't work properly in RTL Mode
try to resize tree columns in following example :
http://dojo.telerik.com/OHUje
is there any fix code for this bug ?
Hi
Is it possible to somewhere download kendo ui not minified source files ( jquery version )?
Hello,
I have some troubles finding out when the grid data is fully loaded and displayed. Is there a way to capture the dataBound event of the grid similar to the one in the jQuery.
I noticed the data state change event also fires before the data is visually displayed, so not an option.
I need to perform an operation with multiple checkboxes, a kind of multiple selection of items so I'm adding "k-state-selected" class to visualize the selected rows.
Kind Regards,
Georgi Mitev
I have a hierarchical grid that i populate data with 2 page methods. When the page loads the is no problem how ever if i reload the grid the rows wont expand. the detailInit event fires. (if i reload it again after the rows don't expand. then everything loads and functions correctly)
function loadGrid(startDate, endDate) {
$("#rgLeaderBoardByManager").kendoGrid({
dataSource: {
data: data
},
dataBound: function (e) {
var grid = this;
$(".k-grouping-row").each(function (e) {
grid.collapseGroup(this);
});
},
sortable: true,
scrollable: true,
detailInit: detailInit,
columns: [
{
field: "Manager",
title: "Manager"
},
{
field: "TotalSalesByManager",
title: "Total Sales"
}
]
});
function detailInit(e) {
var sd1, ed1;
var dateRange = FindControl('<%= rcmLeaderBoardByManagerWidget.ClientID %>').value;
switch (dateRange) {
case "Today":
sd1 = new Date();
ed1 = new Date();
break;
case "Yesterday":
sd1 = new Date().Add("D", -1);
ed1 = new Date().Add("D", -1);
break;
case "Week to Date":
sd1 = new Date().Add("D", -(new Date().getDay()));
ed1 = new Date();
break;
case "Last Week":
sd1 = new Date().Add("D", -(new Date().getDay() + 7));
ed1 = new Date().Add("D", -(new Date().getDay() + 1));
break;
case "Month to Date":
sd1 = new Date(new Date().getFullYear(), new Date().getMonth(), 1);
ed1 = new Date();
break;
case "Last Month":
var endOfLastMonth = new Date(new Date().getFullYear(), new Date().getMonth(), 1).Add("D", -1);
sd1 = new Date(endOfLastMonth.getFullYear());
ed1 = endOfLastMonth;
break;
}
CallWidgetHelper("GetLeaderByManagerWidgetData", function (response) {
$("<div/>").appendTo(e.detailCell).kendoGrid({
dataSource: {
data: response.d
},
scrollable: false,
sortable: true,
columns: [
{ field: "UserFullName" },
{ field: "TotalSales", title:"User"}
]
});
}, null, "startDate", sd1.format('M/d/yyyy'), "endDate", ed1.format('M/d/yyyy'),
"includeCancels", FindControl('<%= hdnIncludeCancels.ClientID %>').value,
"includeChecksPending", FindControl('<%= hdnIncludeChecksPending.ClientID %>').value, "managerId", e.data.ManagerId);
}
}

Hi All
I want to ask about grid, how to call function 'update' in kendo grid from custom function or custom button ?
Thank's
