在.NET Compact Framework的目标版本不支持后期绑定的警告?

编程入门 行业动态 更新时间:2024-10-15 22:31:04
本文介绍了在.NET Compact Framework的目标版本不支持后期绑定的警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在开发基于Visual Studio 2008在.NET精简框架为Windows CE平台的移动应用程序。 我使用vb语言

i am developing a mobile application on visual studio 2008 under compact framework for windows ce platform. i use vb language

我想添加一个新行使用的BindingSource对象的数据表。 我的code是

i want to add a new row to datatable using Bindingsource object. my code is

Me.BindingSource1.AddNew()

Me.BindingSource1.AddNew()

Me.StokBindingSource1.Current(ID)=01

Me.StokBindingSource1.Current("id") = "01"

当我使用的BindingSource的当前methot提示错误 并说在.NET Compact Framework的目标版本不支持后期绑定

when i use Current methot of bindingsource it gives error and says The targeted version of the compact framework does not support late binding

我怎么能确定该领域增加值?

How can i determine the field to add a value?

推荐答案

嗯...你想通过BindingSource的补充? 我建议尝试更新原始数据源本身,而不是再调用BindingSource的.RefreshBindings(假)。

Erm... you're trying to add via the bindingsource? I'd suggest trying to update the original datasource itself instead and then calling .RefreshBindings(false) on the BindingSource.

例如。 (伪 - 抱歉,这是C#)

e.g. (psuedo - sorry it's c#)

MyDataTable table; BindingSource source; SomeKindOfInit() { table = new MyDataTable(); source = new BindingSource(); source.DataSource = table; datagrid1.DataSource = source; } AddSomeStuff() { DataRow row = table.NewRow(); row["Id"] = "01"; table.Rows.Add(row); source.RefreshBindings(false); }

类似的东西反正....出于兴趣......你为什么要手工输入的ID?通常,人们会得到这个从数据库......不是吗?

Something like that anyway.... out of interest... why are you manually entering in the id? Typically one would get this from the database... no?

更多推荐

在.NET Compact Framework的目标版本不支持后期绑定的警告?

本文发布于:2023-11-15 10:59:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1593821.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不支持   绑定   后期   目标   版本

发布评论

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

>www.elefans.com

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