UltraWinGrid选择下拉框DropDown时,如何同步更新其它列

2013年7月31日 开发笔记 评论已被关闭

最近有一个需求,在UltraWingrid列中的DropDown添加对象,当用户选择时值,读取对象同步更新其它列,目前没有一个好的解决方案,在CellChange事件里实现的.

 

Private Sub DataGrid1_CellChange(sender As Object, e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles DataGrid1.CellChange

Dim cur As Common.tb_MM_路线明细 = e.Cell.Row.ListObject

Select Case e.Cell.Column.Key
Case item._工序名称.AttributeName
cur.工序编号 = String.Empty
Dim vl As Infragistics.Win.ValueList = e.Cell.ValueListResolved
If vl Is Nothing OrElse vl.SelectedItem Is Nothing Then
Return
End If
Dim vlitem As Infragistics.Win.ValueListItem = vl.SelectedItem
If vlitem.DataValue Is Nothing Then
Return
End If
cur.工序编号 = CType(vlitem.DataValue, Common.tb_MM_工序定义).工序编号
Case item._设备名称.AttributeName
cur.设备编号 = String.Empty
Dim vl As Infragistics.Win.ValueList = e.Cell.ValueListResolved
If vl Is Nothing OrElse vl.SelectedItem Is Nothing Then
Return
End If
Dim vlitem As Infragistics.Win.ValueListItem = vl.SelectedItem
If vlitem.DataValue Is Nothing Then
Return
End If
cur.设备编号 = CType(vlitem.DataValue, Common.tb_MM_设备定义).设备编号

End Select
End Sub

 

红色的是关键,标记备用…

Jurassic计算是异常Cannot convert object of type ‘System.Decimal’ to a number.

2013年7月31日 开发笔记 评论已被关闭

由于个人对js不是很熟,最新在使用Jurassic进行计算时提示

Cannot convert object of type ‘System.Decimal’ to a number.

那是因为在SetGlobalValue时数据类型是Decimal

Jurassic数据类型与.net 的映射表

 

C# type name .NET type name JavaScript type name
bool System.Boolean boolean
int System.Int32 number
double System.Double number
string System.String string
Jurassic.Null Jurassic.Null null
Jurassic.Undefined Jurassic.Undefined undefined
Jurassic.Library.ObjectInstance (or a derived type) Jurassic.Library.ObjectInstance (or a derived type) object

win7,win8免激活版,精简版下载

2013年7月30日 电脑问题 评论已被关闭

win7,win8免激活版,精简版下载

http://hi.baidu.com/twm_000

 

http://hi.baidu.com/qxrloxbyyqiuwze

 

下次装机时测试,暂时收藏.

vb.net linq groupby 动态分组汇总

2013年7月29日 开发日志 评论已被关闭

vb.net linq group 拼接字符串

2013年7月28日 开发日志 评论已被关闭

帝国刷新内容页时提示 Table ‘*table_ecms_a’ doesn’t exist……update ***_ecms_ set havehtml=1 where id=

2013年7月24日 网站维护 评论已被关闭

xp 不能安装.net 4.0的解决方法

2013年7月19日 电脑问题 评论已被关闭

虚拟机中使用Array SSL VPN拔号后,不能访问主机的问题

2013年7月3日 电脑问题 评论已被关闭

wince中使用SQLite

2013年7月2日 开发日志 评论已被关闭

.net 读取资源文件内容示例代码

2013年6月23日 开发日志 评论已被关闭