这是我的网格:
$("#myHtmlTable1").kendoGrid({
dataSource: {
pageSize: 18
},
scrollable: false,
sortable: true,
filterable: true,
selectable: true,
pageable: {
input: false,
numeric: false
},
change: function () {
// MY LOGIC
},
columns: [
{
field: "Col1",
width: 40
},
{
field: "Col2",
width: 250
},
{
width: 40,
field: "Col3"
},
{
width: 150,
field: "Col4"
}
]
});
Run Code Online (Sandbox Code Playgroud)
当我点击一行时,我会得到行文本并将其放入另一个文本框中。但我只想使用鼠标左键执行此操作,以便我可以在网格上使用右击查看源代码页。
在我的项目中,我使用 Telerik RadGridView 控件,其 ItemSource 是动态对象列表(派生自 DynamicObject)。
我打算使用 AggregateFunctions,如 SumFunction、MinFunction,但它在从动态属性获取值的列中崩溃。如果我是正确的,那是因为 Linq 扩展,而不是 Telerik。
这个问题有什么解决方法吗?
更新
模型类看起来像这样
public class SampleModel : DynamicObject
{
// some properties
}
Run Code Online (Sandbox Code Playgroud)
来源是这样的:
myGrid.ItemsSource = new List<SampleModel> { // some model items };
Run Code Online (Sandbox Code Playgroud)
XAML 是:
<telerik:RadGridView ShowColumnFooters="True" AutoGenerateColumns="False" x:Name="myGrid">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding p1}">
<telerik:GridViewDataColumn.AggregateFunctions>
<telerik:SumFunction />
</telerik:GridViewDataColumn.AggregateFunctions>
</telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Run Code Online (Sandbox Code Playgroud)
其中p1是动态属性
异常消息是:
类型“System.Linq.Enumerable”上的泛型方法“Sum”与提供的类型参数和参数不兼容。如果方法是非泛型的,则不应提供类型参数。
这是我的xaml
<Window.Resources>
<sampleData:MainWindow x:Key="DataSource"/>
<DataTemplate x:Key="CustomComponentParameter">
<TextBlock Text="{Binding Name}" />
</DataTemplate>
<HierarchicalDataTemplate x:Key="CustomComponent" ItemTemplate="{StaticResource CustomComponentParameter}"
ItemsSource="{Binding Parameters }">
<TextBlock Text="{Binding Name}" />
</HierarchicalDataTemplate>
</Window.Resources>
Run Code Online (Sandbox Code Playgroud)
用于telerik控制
<telerik:RadTreeView ItemsSource="{Binding Source={StaticResource DataSource},Path=SummaryViewCollection}" ItemTemplate="{StaticResource CustomComponent}" HorizontalAlignment="Left" Height="77" Margin="345,482,0,0" VerticalAlignment="Top" Width="449">
</telerik:RadTreeView>
Run Code Online (Sandbox Code Playgroud)
这是我的Codebehind课程
主要Codebehind类MainWindow.xaml.cs的代码
public partial class MainWindow : Window
{
public ObservableCollection<CustomComponent> SummaryViewCollection { get; set; }
public MainWindow()
{
this.SummaryViewCollection = //code to fill in the details
}
}
Run Code Online (Sandbox Code Playgroud)
这是CustomComponentClass的代码
public class CustomComponent
{
private ObservableCollection<CustomComponentParameter> parameters = new ObservableCollection<CustomComponentParameter>();
public string Name …Run Code Online (Sandbox Code Playgroud) 无论如何,在 Telerik 报告中,是否可以将类似于 1.66667 的数字四舍五入到小数点后两位,如 1.67。我知道他们有一个名为Round(number). 但它只四舍五入为整数值。
我评估剑道的UI,我想配置意见 views: [{type: "week", ...}, { type: "workweek", ...}, { type: "month", ...}]的剑道的UI调度总是与周一开始.
我发现问:将周的第一天设置为星期一,但没有接受答案,并且提供的解决方案对我不起作用.
所以在尝试了几件事后我最终得到了:
$("#scheduler2").kendoScheduler({
date: new Date("2014/12/1"),
allDayEventTemplate: $("#event-template").html(),
timezone: "Etc/UTC",
views: [{ type:"day", showWorkHours:true, workWeekStart:0}
,{type:"week", workWeekStart:1, workWeekEnd:5
, showWorkHours:true, selected:true}
,{type:"workWeek", workWeekStart:1, workWeekEnd:0
, showWorkHours: true, selected: true }
,{type:"month", workWeekStart: 2 }
, "agenda"]
,dataSource: events1,
resources: [ { field: "attendees", dataSource: people1, multiple: true } ]
});
Run Code Online (Sandbox Code Playgroud)
正如你所看到的那样,type:"workWeek"每周工作都以星期一开始,因为我将workWeekEnd:0它设置为星期日.使用相同的配置设置type:"week"或 type:"month" 无效 - …
我正在使用kendoTreeList
我正在努力扩大所有群体.这是我的代码示例
但似乎kendoTreeList只支持扩展第一组.我也在expand方法中尝试了以下选择器.
treeList.expand($( "K-树形列表的基团.")); 扩大所有群体.即使选择器$(".k-treelist-group").长度为3(组的总数),但是树形图仅扩展第一组.
有任何建议请告诉我.
我使用kendo网格插件来显示数据.使用内置功能导出优于kendo网格,导出网格数据. http://demos.telerik.com/kendo-ui/grid/excel-export 但我想在将数据导出到excel之前删除2列.
请让我知道如何实现它
谢谢,努普尔
完全按照示例中的说明实施Kendo Grid。
这是示例中的寻呼机:

这是我的传呼机:

注意箭头如何位于按钮顶部。

为什么会这样呢?我以为如果您安装KendoUI,一切都应该开箱即用?
我已经在Chrome,Firefox和IE中尝试过此方法,并且结果相同。
有谁知道如何解决这一问题?
最糟糕的部分是右侧的刷新,它与旁边的物品数量完全不一致。
我什至尝试过在新解决方案上进行全新安装,但也没有解决问题。
有人可以帮帮我吗?也许还有更多步骤可以正确安装Kendo UI?
我有剑道网格,我的问题是当文本太长时,我无法使该文本断行,我尝试制作 css,但效果不佳。这是我的CSS:
#projectslistgrid .k-grid-content td{
word-wrap:break-word;
}
Run Code Online (Sandbox Code Playgroud)
这是图像:
请帮帮我,谢谢。
我正在为我的Xamarin表单应用程序使用Telerik图表.
显示包含Telerik图表的页面的Telerik广告.我可以通过关闭按钮(X)的帮助关闭此弹出窗口.但是,我不想看到这个弹出窗口.如何防止此广告弹出窗口?
我有一个 Kendo 甜甜圈图表,我需要可点击该图表并将甜甜圈上的每个值重定向到 www.foo.com/(foovalue)。telerik 网站上的文档很糟糕,任何帮助都会很棒。
我的组件 html 看起来像
<kendo-chart style="height: 500px;">
<kendo-chart-title text="Top Product Violations"></kendo-chart-title>
<kendo-chart-series>
<kendo-chart-series-item
type="column" [data]="getTopProductViolations.topViolationsByProductsList"
categoryField="name" field="count">
<kendo-chart-series-item-labels
color="#fff" background="none">
</kendo-chart-series-item-labels>
</kendo-chart-series-item>
</kendo-chart-series>
<kendo-chart-category-axis>
<kendo-chart-category-axis-item
[labels]="{ rotation: '-45' }">
</kendo-chart-category-axis-item>
</kendo-chart-category-axis>
<kendo-chart-legend [visible]="false"></kendo-chart-legend>
</kendo-chart>
Run Code Online (Sandbox Code Playgroud) 我刚刚部署了一个新的MVC3应用程序,经过我的托管服务提供商的一些努力,MVC3似乎运行正常,但现在我在网站上的任何内容加载之前得到以下编译错误:
CS0246:找不到类型或命名空间名称'Telerik'(您是否缺少using指令或程序集引用?)
这发生在以下行的web.config中:
<add namespace="Telerik.Web.Mvc.UI" />
Run Code Online (Sandbox Code Playgroud)
我知道DLL存在于主机上的bin文件夹中,所以我有点丢失了什么可能是错的.
我想获取未加密的用户密码.怎么弄这个?
public static string GetCurrentUserPassword(string userName)
{
MembershipProvider p = (MembershipProvider)Membership.Providers["Default"];
MembershipUser obj = Membership.GetUser(userName);
return obj.GetPassword();
}
obj type : [Telerik.Sitefinity.Security.Model.User] = User "user1", Id={59d9813c-f88e-4790-9f19-3145ba8347d1}, Provider="Default"
password : "+HmReh/mzvIIuvYsM7+XdEoeQhI="
Run Code Online (Sandbox Code Playgroud) telerik ×13
kendo-ui ×7
kendo-grid ×4
c# ×3
asp.net ×2
jquery ×2
.net ×1
angular ×1
asp.net-mvc ×1
css ×1
dojo ×1
dynamic ×1
javascript ×1
linq ×1
telerik-grid ×1
telerik-mvc ×1
wpf ×1
xaml ×1