or
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCExcelReportDashboardView.aspx.cs" Inherits="Shell.SharePoint.SSP.SSC.Visualization.SCExcelReportDashboardView" %>
<
html
>
<
head
id
=
"head1"
runat
=
"server"
>
<
title
>Excel Report</
title
>
<
style
type
=
"text/css"
>
ul
{
list-style-type:none;
margin:0;
padding:0;
}
li
{
display:inline !important;
}
</
style
>
</
head
>
<
body
>
<
div
id
=
"loadingDivExcelReport"
style
=
"display: none; z-index: 1000; position: absolute; padding-top: 130px; padding-left: 50%;text-align:center"
>
<
img
id
=
""
alt
=
"loading.."
src
=
"/_layouts/images/Shell.SharePoint.SP.SSC/KendoUI/loading-image.gif"
><
br
>Loading content, please wait..
</
div
>
<
table
>
<
tr
>
<
td
>
<
div
id
=
"excelReportTabstrip"
>
</
div
>
</
td
>
</
tr
>
</
table
>
<
script
type
=
"text/javascript"
>
var exportToExcelUrl;
function onSelect(e) {
//alert("onSelect");
$('#loadingDivExcelReport').css('display', 'block');
if (e.item.innerText == "Export") {
window.location.href = exportToExcelUrl + "/model?$format=workbook";
}
//kendoConsole.log("Selected: " + $(e.item).find("> .k-link").text());
}
function onActivate(e) {
//alert("onActivate");
$('#loadingDivExcelReport').css('display', 'none');
//kendoConsole.log("Activated: " + $(e.item).find("> .k-link").text());
}
function onContentLoad(e) {
//alert("onContentLoad");
//kendoConsole.log("Content loaded in <
b
>" + $(e.item).find("> .k-link").text() + "</
b
> and starts with <
b
>" + $(e.contentElement).text().substr(0, 20) + "...</
b
>");
}
function onError(e) {
alert("Loading failed with " + e.xhr.statusText + " " + e.xhr.status);
//alert("Error Occured While Loading...!");
//kendoConsole.error("Loading failed with " + e.xhr.statusText + " " + e.xhr.status);
}
$(function () {
//debugger;
function GetQueryParameters() {
var vars = [], hash;
var hrefValue = window.location.href;
hashes = hrefValue.slice(hrefValue.indexOf('?') + 1).split('&');
for (var i = 0; i <
hashes.length
; i++) {
hash
=
hashes
[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
var tabStrip = $("#excelReportTabstrip").kendoTabStrip({ animation: false, collapsible: false, select: onSelect, activate: onActivate, contentLoad: onContentLoad, error: onError }).data('kendoTabStrip');
var
fileName
=
GetQueryParameters
()["ExcelFileName"];
var
excelSheetInfo
=
GetQueryParameters
()["SheetNames"].split('|');
var
startDateTime
=
GetQueryParameters
()["StartDate"];
var
endDateTime
=
GetQueryParameters
()["EndDate"];
var
analysisMode
=
GetQueryParameters
()["AnalisysMode"];
var
currentWebUrl
=
window
.location.pathname;
currentWebUrl
= currentWebUrl.substring(0, currentWebUrl.lastIndexOf('/') - 7);
exportToExcelUrl
=
window
.location.protocol+"//" + window.location.host + currentWebUrl + "_vti_bin/ExcelRest.aspx/Lists/SCExcelReports/" + fileName;
for (var
i
=
0
; i < excelSheetInfo.length; i++) {
var
excelReportUrl
=
window
.location.protocol+"//" + window.location.host + currentWebUrl + "_vti_bin/ExcelRest.aspx/Lists/SCExcelReports/" + fileName + "/model/Ranges('" + excelSheetInfo[i] + "')?Ranges('AnalysisPeriod')=" +
"%22" + startDateTime + ";" + endDateTime + ";" + analysisMode + "%22";
tabStrip.append({
text: excelSheetInfo[i],
contentUrl: excelReportUrl
});
}
tabStrip.append({
text: 'Export',
imageUrl: "/_layouts/images/Shell.SharePoint.SP.SSC/KendoUI/ExportToExcel.png",
content: "Export to Microsoft Excel"
});
tabStrip.select(tabStrip.tabGroup.children('li').eq(0));
});
</script>
</
body
>
</
html
>
using
System;
using
Microsoft.SharePoint;
using
Microsoft.SharePoint.WebControls;
using
System.Web.UI;
using
Microsoft.SharePoint.Utilities;
using
Shell.SharePoint.SSP.SSC.Common;
using
System.Web.UI.HtmlControls;
namespace
Shell.SharePoint.SSP.SSC.Visualization
{
public
partial
class
SCExcelReportDashboardView :Page
{
protected
void
Page_Init(
object
sender, EventArgs e)
{
string
[] jsArray =
new
string
[] {
"/SCJquery/jquery.min.js"
,
"/SCJquery/kendo.all.min.js"
};
string
[] cssArray =
new
string
[] {
"/SCCss/kendo.common.min.css"
,
"/SCCss/kendo.default.min.css"
};
for
(
int
jsIndex = 0; jsIndex < jsArray.Length; jsIndex++)
{
HtmlGenericControl jScript =
new
HtmlGenericControl(
"script"
);
jScript.Attributes.Add(
"type"
,
"text/javascript"
);
jScript.Attributes.Add(
"src"
, SPContext.Current.Site.Url + jsArray[jsIndex]);
Page.Header.Controls.Add(jScript);
}
for
(
int
cssIndex = 0; cssIndex < cssArray.Length; cssIndex++)
{
HtmlLink cssLink =
new
HtmlLink();
cssLink.Href = SPContext.Current.Site.Url + cssArray[cssIndex];
cssLink.Attributes.Add(
"rel"
,
"stylesheet"
);
cssLink.Attributes.Add(
"type"
,
"text/css"
);
Page.Header.Controls.Add(cssLink);
}
}
protected
void
Page_Load(
object
sender, EventArgs e)
{
}
}
}
<!DOCTYPE html>
<
html
>
<
head
>
<
meta
name
=
"viewport"
content
=
"width=device-width"
/>
<
title
>Index</
title
>
<
link
href
=
"./styles/kendo.common.css"
rel
=
"stylesheet"
/>
<
link
href
=
"./styles/kendo.default.css"
rel
=
"stylesheet"
/>
<
script
src
=
"./lib/jquery.min.js"
></
script
>
<
script
src
=
"./lib/kendo.all.min.js"
></
script
>
<
script
>
var Test = kendo.Class.extend({
myAlert: function (e) {
alert("test");
}
})
$(document).ready(function () {
var test = new Test();
kendo.bind($("#test"), test);
})
</
script
>
</
head
>
<
body
>
<
div
data-role
=
"view"
id
=
"test"
>
<
a
href
=
"#test"
class
=
"button"
data-role
=
"button"
data-bind
=
"events: { click: myAlert }"
data-icon
=
"search"
>buttonTest</
a
>
</
div
>
</
body
>
</
html
>
thank you so much for helping.
<
div
data-role
=
"view"
id
=
"login-view"
data-layout
=
"blank"
data-model
=
"app.views.login.viewModel"
>
<
h1
style
=
"text-align: center;"
>Title</
h1
>
<
form
id
=
"login"
>
<
input
data-bind
=
"value: username"
id
=
"username"
type
=
"text"
placeholder
=
"Username"
/><
br
/>
<
input
data-bind
=
"value: password"
id
=
"password"
type
=
"password"
placeholder
=
"Password"
/><
br
/>
<
input
type
=
"submit"
value
=
"Login"
data-bind
=
"click: authenticate"
/>
</
form
>
</
div
>
define([
"jQuery"
,
"kendo"
,
"modernizr"
,
"app/environment"
],
function
($, kendo, modernizr, environment) {
var
authenticate =
function
(username, password) {
return
$.ajax({
url: environment.apiConnection +
'/canlogin?userid='
+ username +
'&password='
+ password,
type:
'get'
,
dataType:
'jsonp'
});
}
authenticate().done(
function
(data) {
alert(data);
}).fail(
function
() {
alert(
'fail'
);
})
return
{
viewModel: kendo.observable({
username:
null
,
password:
null
,
authenticate:
function
() {
var
username =
this
.get(
'username'
),
password =
this
.get(
'password'
);
authenticate(username, password);
if
(!Modernizr.localstorage) {
alert(
'There was an error accessing LocalStorage on this device.'
);
return
;
}
localStorage[
"username"
] = username;
localStorage[
"password"
] = password;
}
})
}
});
public ActionResult EditingInline_Destroy([DataSourceRequest] DataSourceRequest request, MemoModel memo)
But the memo is coming in Null.
How is the Destroy or Update supposed to pass in the object or ID of the row being deleted?