【问题标题】:Syncfusion ASP.NET MVC RowIndexSyncfusion ASP.NET MVC 行索引
【发布时间】:2016-08-23 04:25:07
【问题描述】:

当我动态添加行或将其绑定到 DataSource 时如何获取 RowIndex?

有人可以推荐吗?

我正在尝试通过以下方式添加 CustomAttribute

col.Field("Name").HeaderText("Name").Width(90).CustomAttributes(custom => { custom.AddAttribute("name", "'{{ :RowIndex }}'"); }).Add();

TIA 马诺吉

【问题讨论】:

  • 你已经尝试了什么..你能发布你的代码
  • @SunilKumar - 编辑问题并添加代码。

标签: asp.net-mvc syncfusion


【解决方案1】:

根据您的要求使用以下代码示例。为此使用 jquery 索引。

col.Field("Name").HeaderText("Name").CustomAttributes(custom =>
                      {
                          custom.AddAttribute("name", "'{{:#index}}'");
                      }).Add();

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-11
    • 2010-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多