如何修复列的kendo网格中的舍入问题。

时间:2016-11-10 10:30:46

标签: kendo-grid kendo-asp.net-mvc

我正在使用kendo Grid,其中我将字符串值723086288701357234绑定在一个舍入为“723086288701357200'”的列中。我认为这是问题,因为将int类型模型绑定到列,所以我用字符串更改它但问题仍然存在。

网格绑定。

 @(Html.Kendo().Grid<Assets>().Name("rgdSearchTrackingDevices").HtmlAttributes(new { @Style = "text-align:left;font-size:8pt;;width:99%;visibility:hidden;" }).Columns(columns =>
              {
                  columns.ImageColumn("<span class='spirtgrid sprite-Search' title='View' onclick=\"ViewManageDeviceDetails('#=AssetID#') \"></span>").Filterable(false).Groupable(false).Sortable(false).HtmlAttributes(new { @style = "width:30px; text-align:center;" }).HeaderHtmlAttributes(new { @style = "width:30px;" }).Title("View");
                  columns.ImageColumn("<span class='spirtgrid sprite-Controls' title='Control' onclick=\"ControlDevice('#=AssetID#','#=CompanyID#') \"></span>").Filterable(false).Groupable(false).Sortable(false).HtmlAttributes(new { @style = "width:40px; text-align:center;" }).HeaderHtmlAttributes(new { @style = "width:40px;" }).Title("Control");
                  columns.Bound(x => x.Alias).Filterable(HtmlExtensions.BoundColumnFilter).ClientTemplate("<span class='link' onclick=\"ViewManageDeviceDetails('#=AssetID#')\">#=Alias#</span>").Filterable(HtmlExtensions.BoundColumnFilter);
                  columns.Bound(x => x.MDN).ClientTemplate("<span class='link' onclick=\"ViewDeviceDetails('#=AssetID#')\">#=AssetKey#</span>").Filterable(HtmlExtensions.BoundColumnFilter).Title("MDN");
                  columns.Bound(x => x.IMEI);
                  columns.Bound(x => x.BatteryPercentage_Converted).Title("Battery %");
                  columns.Bound(x => x.Company.Company1).Title("Company").ClientTemplate("<span class='link' onclick=\"ViewCompanyDetails('#=CompanyID#')\">#=Company.Company1#</span>").Filterable(HtmlExtensions.BoundColumnFilter);
                  columns.Bound(x => x.DeviceType.DeviceType1).Title("Device Type").HtmlAttributes(new { @style = "width:130px;" }).HeaderHtmlAttributes(new { @style = "width:130px;" }).Filterable(HtmlExtensions.BoundColumnFilter);
              })
              .DataSource(datasource => datasource.Ajax()
                  .Read(read => read.Action(Constants.ControllerName.UserControls_Device, Constants.ActionName.ReadSearchDevice).Data("searchData_TrackingDevice")))
                  .Filterable(HtmlExtensions.FilterConfiguration)
                  .Filterable(x => x.Extra(false))
                  .Sortable(sort => sort.Enabled(true))
                  .AutoBind(false)
                  .Resizable(resize => resize.Columns(true))
                  .Pageable(pagable => pagable.PageSizes(pageSize))
                  .Scrollable(scroll => scroll.Enabled(true))
                  .Events(e => e.DataBound("rgdSearchTrackingDevices_DataBound"))
                  )

这里在MDN专栏中我得到了这个问题。请告诉我哪里做错了。谢谢。

0 个答案:

没有答案