刚开始使用vsflexgrid。
1、本意是想定义每列的数据类型,在输入的时候做一个判断,但是不知道为什么不响应....
程序如下:
private sub vsflexgrid1_Afteredit(byval row as long,byval col as long)
if vsflexgrid1.coldatatype(col)=flexdtnull and vsflexgrid.coldatatype(1)<>flexdtshort then
msgbox"错误"
end if
end sub不响应....我将其中自编的程序段放到_validataEdit()中也不响应...2、不仅想要控制列的数据类型,还想控制输入数据的长度,但是没有找到相关的属性。烦劳各位给说说关于我问题的用法...谢谢先
1、本意是想定义每列的数据类型,在输入的时候做一个判断,但是不知道为什么不响应....
程序如下:
private sub vsflexgrid1_Afteredit(byval row as long,byval col as long)
if vsflexgrid1.coldatatype(col)=flexdtnull and vsflexgrid.coldatatype(1)<>flexdtshort then
msgbox"错误"
end if
end sub不响应....我将其中自编的程序段放到_validataEdit()中也不响应...2、不仅想要控制列的数据类型,还想控制输入数据的长度,但是没有找到相关的属性。烦劳各位给说说关于我问题的用法...谢谢先
我在窗体上放了一个WebBrowser控件,就可以浏览网站了,但是网站有一些弹出的窗体,却使用了系统默认的浏览器,既使用的IE作为弹出窗体的浏览器了。
flexDTEmpty 0
flexDTNull 1
flexDTShort 2
flexDTLong 3
flexDTSingle 4
flexDTDouble 5
flexDTCurrency 6
flexDTDate 7
flexDTString 8
flexDTDispatch 9
flexDTError 10
flexDTBoolean 11
flexDTVariant 12
flexDTUnknown 13
flexDTDecimal 14
flexDTLong8 20
flexDTStringC 30
flexDTStringW 31
This property is automatically set for each column when the control is bound to a recordset, so you can determine the data type of each field. When not in bound mode, you may set this property using code.There are two column types that receive special treatment from the control:flexDTDate
This setting is taken into account when sorting dates either using the Sort property or when the user clicks the ExplorerBar. If you don't set the column type to flexDTDate, the dates will be sorted as strings.flexDTBoolean
This setting causes the control to display check boxes instead of strings. The mapping between strings and check boxes follows the rules for Variant conversion: any non-zero value and the "True" string are displayed as checked boxes; zero values are displayed as unchecked boxes.For example: fg.ColDataType(1) = flexDTBoolean
fg.TextMatrix(1, 1) = 1 ' checked
fg.TextMatrix(2, 1) = True ' checked
fg.TextMatrix(3, 1) = "True" ' checked
fg.TextMatrix(4, 1) = 0 ' not checked
fg.TextMatrix(5, 1) = "False" ' not checked
fg.TextMatrix(6, 1) = "foobar" ' not checkedIf you want to display custom strings for boolean values instead of check boxes, set the ColFormat property to a string containing the values you want to display for True and False values, separated by a semicolon. For example: fg.ColDataType(2) = flexDTBoolean
fg.ColFormat(2) = "Yes;Not Available" ' or "True;False", "On;Off", "Yes;No", etc.When setting this property, the Col parameter should be set to a value between zero and Cols - 1 to set the data type of a given column, or to -1 to set the data type of all columns.Data Type
DataTypeSettings (Enumeration)
先谢谢,应该是我E文太差吧,没有完全看懂(或者说我没感觉我哪用的不对啊...)。能帮忙根据我的实际例子指出问题嘛?