我有一个我创建并在另一个解决方案中安装的nuget包但现在我需要在从我的新解决方案调用时调试包的代码.
我尝试引用包的解决方案,但无法正常工作.
我正在使用Visual Studio 2013.
今天早上我突然去上班,做了一个最新版本,然后我开始使用Sitecore 6.5,我的工作状况还不错
[NullReferenceException: Object reference not set to an instance of an object.]
Sitecore.Shell.Applications.ContentEditor.Editors.Folder.FolderPage.Render() +358
System.Web.UI.Control.LoadRecursive() +70
System.Web.UI.Control.LoadRecursive() +189
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3177
Run Code Online (Sandbox Code Playgroud)
另外,有时在打开文件夹时出现此错误:
> [InvalidOperationException: The Sitecore.Client.Device is null.]
> Sitecore.Client.get_Device() +86 Sitecore.UIUtil.GetBrowserClassString() +326
> Sitecore.sitecore.login.LoginPage.AddBrowserAttributes() +135
> Sitecore.sitecore.login.LoginPage.OnPreRender(EventArgs e) +435
> System.Web.UI.Control.PreRenderRecursiveInternal() +113
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
> +4297
Run Code Online (Sandbox Code Playgroud)
任何想法如何解决它?
我有一个带有一些环境数据的Kendo Grid.网格的一个字段是"isDefault",它接收1或0(对于真或假).在数据库中,我有一个触发器,当某个记录设置为isDefault = 1时,任何其他记录都更新为isDefault = 0,只是为了确保只有一个默认环境.
Kendo网格工作正常,它绑定数据并更新记录就好了但是在更新之后,网格没有刷新所有记录,如果有,比方说,记录1,isDefault = 1,我更新记录4到isDefault = 1触发器被触发并将所有其他记录更新为isDefault = 0但网格仍然显示记录1,isDefault = 1,现在记录4,isDefault = 1
这是我视图中的代码:
Html.Kendo().Grid<Models.Environment>()
.Name("environmentGrid")
.Sortable()
.ToolBar(tb => tb.Create())
.Editable(editable => editable.Mode(GridEditMode.PopUp))
.Columns(cols =>
{
cols.Bound(c => c.Name).Width(150).Sortable(true);
cols.Bound(c => c.ConnectionString).Width(150).Sortable(true);
cols.Bound(c => c.Template).Width(150).Sortable(true);
cols.Bound(c => c.isDefault).Width(150).Sortable(true);
cols.Bound(c => c.StatusID).Width(150).Sortable(true);
cols.Command(command => { command.Edit();}).Width(60);
})
.DataSource(ds => ds
.Ajax()
.Model(model =>
{
model.Id(m => m.EnvironmentID);
})
.Read(r => r.Action("GetEnvironments", "Admin"))
.Update(update => update.Action("UpdateEnvironments", "Admin"))
.Create(update => update.Action("UpdateEnvironments", "Admin"))
)
Run Code Online (Sandbox Code Playgroud)
这是我的控制器上的代码:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult UpdateEnvironments([DataSourceRequest] DataSourceRequest …Run Code Online (Sandbox Code Playgroud) 我的应用程序中有这个kendo窗口
Html.Kendo().Window()
.Name("copyStructure")
.Title("Copy Structure")
.Content("Loading...")
.LoadContentFrom("CopyStructure", "NewXmlLayout") // <-- here*
.Draggable(false)
.Visible(false)
.Modal(true)
.Actions(s => s.Custom(""))
.Events(e => e.Open("openWindow").Close("closeWindow"))
Run Code Online (Sandbox Code Playgroud)
我试图将数据传递给LoadContentFrom()中的acrion,它由javascript函数返回,但我不知道该怎么做.我可以传递这样的数据:
.LoadContentFrom("CopyStructure", "NewXmlLayout", new { type= "INPUT" })
Run Code Online (Sandbox Code Playgroud)
但这不是我想要的.
JS功能:
function getInfo() {
return { type: "INPUT" };
};
Run Code Online (Sandbox Code Playgroud)
我的控制器:
public ActionResult CopyStructure(string type)
{
return PartialView();
}
Run Code Online (Sandbox Code Playgroud)