table'参数不能为null。参数名称:表格

编程入门 行业动态 更新时间:2024-10-28 08:29:33
本文介绍了table'参数不能为null。参数名称:表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在开发一个crm项目,它从crm中检索数据并向他们展示 ,这里我们去吧/> DataTable dt = RetrieveAttendeePersons(); DataSet ds = new DataSet(); ds.Tables.Add (dt); RadGrid1.DataSource = ds; RadGrid1.DataBind(); ,错误是:table'参数不能为null。参数名称:table,它指向以下行:ds.Tables.Add(dt); 我非常感谢你的帮助。

解决方案

似乎数据表是 null , 验证表格,然后将其添加到数据集中。

if (dt!= null ) ds.Tables.Add(dt);

Hi , I am working on a crm project which retrieve data from crm and show them , here we go DataTable dt = RetrieveAttendeePersons(); DataSet ds = new DataSet(); ds.Tables.Add(dt); RadGrid1.DataSource = ds; RadGrid1.DataBind(); and the error is : table' argument cannot be null. Parameter name: table and it points to the following line : ds.Tables.Add(dt); I would really appreciate your help .

解决方案

It Seems the datatable is null, validate the table before adding it to a dataset.

if(dt!= null) ds.Tables.Add(dt);

更多推荐

table'参数不能为null。参数名称:表格

本文发布于:2023-10-22 22:10:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1518871.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:参数   能为   表格   名称   table

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!