简体   繁体   English

“没有可用数据。”它来自哪里?

[英]“There is no data available.” Where is it from?

I have the code below and I want to display the data in the table. 我有下面的代码,我想在表中显示数据。

<div class="widget wblue no-margin-top">
  <div class="widget-head">
    <div class="pull-left">Country Languages</div>
    <div class="pull-right"><a href="#addLanguageModal" class="btn btn-navbar btn-gray" data-toggle="modal" role="button">Add New Language</a></div>
  </div>
  <div class="widget-content">
    @using (Html.BeginForm("Language", "Country", FormMethod.Post, new { enctype = "multipart/form-data" }))
    {
      @Html.HiddenFor(m => m.CountryId)
      @Html.Grid(Model.Languages).Columns(column =>
      {
        column.For(m => m.LanguageName).Named("Languages");
        column.For(m => String.Format("<a class='btn btn-primary' href='/Country/LanguageEdit/{0}'>Edit</a> <a href='#deleteConfirmModal' role='button' data-toggle='modal' class='btn btn-danger deleteBtn'><input type='hidden' id='CountryId' value='{0}'/>Remove</a>", m.CountryId)).Named("Actions").Encode(false);
      }).Attributes(@class => "table")
   }
  </div>
</div>

Unfortunately for this CountryId there is no language in the database. 不幸的是,对于该CountryId,数据库中没有语言。 I saw it displayed the sentence 我看到它显示了这句话

There is no data available. 没有可用数据。

I don't have this sentence There is no data available. 我没有这句话There is no data available. in my code. 在我的代码中。 My question is where is it from? 我的问题是从哪里来的? How it was generated? 它是如何产生的? From Bootstrap or Razor engine? 从Bootstrap还是Razor引擎?

The message is from your @Html.Grid . 该消息来自您的@Html.Grid Like other helpers, this HTML helper will render an html grid component on the page which may or may not use javascript files along with it. 像其他帮助器一样,此HTML帮助器将在页面上呈现html网格组件,该组件可能会或可能不会一起使用javascript文件。

You can actually customize the message for empty data by doing the following: Overriding the default 'No Data' Message in MVCContrib Grid 您实际上可以通过执行以下操作为空数据自定义消息: 在MVCContrib网格中覆盖默认的“无数据”消息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Kendo Mvc Treelist 显示“没有可用的记录”。 升级后 - Kendo Mvc Treelist shows "No records available." after upgrading 是否可以在“动作过滤器”中使用“动作方法”中的数据? - Is it possible to make data from an Action Method available in an Action Filter? 可以从带条件的viewbag中检索数据 - Possible to retrieve data from viewbag with where condition MVC路线数据不可用 - MVC Routes data not available 如果视图模型中只有对象数据可用,则在linq中联接数据-ASP.net -mvc5 - join data in linq if only data for object is available from view model - ASP.net -mvc5 在MVC视图之间传递参数以匹配模型中可用数据源中的项 - Passing arguments between MVC views to match an item from a data source available in the model 如何访问和绑定Upshot提供的实体元数据(通过客户端上的JavaScript)? - How does one access and bind the entity meta-data (through JavaScript on the client) available from Upshot? 在将数据保存到数据库之前,应如何保留excel文件中的数据? - Where to keep data from excel file before saving it in database? 我的数据从MVC应用程序保存到哪里? - Where does my data save from my MVC application? 有什么方法可以根据多个表中的多个位置检索数据 - Is there any way to retrieve data based on multple where from multiple table
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM