简体   繁体   English

如何在 C# MVC 中使用 Jquery 获取网格中字符的长度

[英]How to Get the length of the Characters in grid using Jquery in C# MVC

i want to get the number of characters in Grid from the below Jquery script我想从下面的 Jquery 脚本中获取 Grid 中的字符数

Even though i tried by length(data) it shows that length is a property not a function after removing function the number of charaters are show as 0即使我尝试通过长度(数据)它表明长度是一个属性而不是删除函数后的函数字符数显示为 0

{
         "sDefaultContent": "", "data": "fld_output_value", "width": 90, "title": "Output Length", render: function (data, string, full, meta) {
                            return length;
                        }
                    },

after updating my code it's更新我的代码后

{
         "sDefaultContent": "", "data": "fld_output_value", "width": 90, "title": "Output Length", render: function (data, string, full, meta) {
                            return data.length;
                        }
                    },

正如@R4ncid 所说

data.length

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM