[英]how to bind property abc of type IList<string> to textbox as a datafield
I am working on a report and I have a property of type IList as follows: 我正在处理报告,并且具有IList类型的属性,如下所示:
public IList<string> abc { get; set; }
I have populated this list in code, but how can I assign this populated list to textbox's datafield property in order to get list data on report. 我已经在代码中填充了此列表,但是如何将该填充的列表分配给文本框的datafield属性,以获取报表中的列表数据。
StringBuilder sb = new StringBuiler();
Foreach (string s in abc)
sb.AppendLine(s);
Mytextbox.Text = sb.ToString();
Make the TextBox multiline 使TextBox多行
If you don't want lines then sb.Append() 如果你不想要行,那么sb.Append()
Have you looked at the IListBinding sample that comes with the installer? 您是否看过安装程序随附的IListBinding示例? It essentially does what you are trying to accomplish. 本质上,它可以完成您要完成的任务。
you can find it here on your machine. 您可以在计算机上的此处找到它。 (ActiveReports 9) (ActiveReports 9)
C:\\Users\\\\Documents\\ComponentOne Samples\\ActiveReports 9\\Section Reports\\Data\\IListBinding C:\\ Users \\\\ Documents \\ ComponentOne Samples \\ ActiveReports 9 \\ Section Reports \\ Data \\ IListBinding
If you are sill having issues, email activereports.support@grapecity.com with ref to this post. 如果您仍然遇到问题,请发送电子邮件至activereports.support@grapecity.com,并提供有关此帖子的参考。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.