数据网格问题 [英] Data Grid problem

查看:76
本文介绍了数据网格问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在使用vb。我的表格上有数据网格。在运行时,我无法将数据输入数据网格。我认为网格是锁定的。我是否需要设置任何属性或需要编写代码以在运行时输入尽可能多的记录?


我正在使用DataGrid。没关系,或者我应该使用DBGrid。我的后端是访问。

请尽快帮助我。这是非常紧急的。

Hi,

I am using vb. I have data grid on my form. At runtime i am not able to enter data into data grid. I think grid is locked. Do i need to set any property or need to write code to enter as many records as i want at runtime?

I am using DataGrid. Is it ok or i should use DBGrid. My back end is access.
Please help me soon. It is quite urgent.

推荐答案





我是使用vb。我的表格上有数据网格。在运行时,我无法将数据输入数据网格。我认为网格是锁定的。我是否需要设置任何属性或需要编写代码以在运行时输入尽可能多的记录?


我正在使用DataGrid。没关系,或者我应该使用DBGrid。我的后端是访问。

请尽快帮助我。这很紧急。
Hi,

I am using vb. I have data grid on my form. At runtime i am not able to enter data into data grid. I think grid is locked. Do i need to set any property or need to write code to enter as many records as i want at runtime?

I am using DataGrid. Is it ok or i should use DBGrid. My back end is access.
Please help me soon. It is quite urgent.


$ b $不要去你的Componants VsFlexGrid

y dont'' u go for Componants VsFlexGrid



你好,


我正在使用vb。我的表格上有数据网格。在运行时,我无法将数据输入数据网格。我认为网格是锁定的。我是否需要设置任何属性或需要编写代码以在运行时输入尽可能多的记录?


我正在使用DataGrid。没关系,或者我应该使用DBGrid。我的后端是访问。

请尽快帮助我。这很紧急。
Hi,

I am using vb. I have data grid on my form. At runtime i am not able to enter data into data grid. I think grid is locked. Do i need to set any property or need to write code to enter as many records as i want at runtime?

I am using DataGrid. Is it ok or i should use DBGrid. My back end is access.
Please help me soon. It is quite urgent.






参考此链接


http:// msdn2.microsoft.com/en-us/library/y4ddh1ac(vs.80).aspx


它可以帮助您解决问题。


thanks

ansuman sahu

Hi ,

Refer to this link

http://msdn2.microsoft.com/en-us/library/y4ddh1ac(vs.80).aspx

it might help you solve your problem.

thanks
ansuman sahu


ansuman的链接将帮助您,如果您使用的是visual studio 2005

以下是确切的链接(我推测)

请仔细阅读教程
http://msdn.microsoft.com/library/de...ridControl.asp


首先检查allowaddnew属性将其设置为true

此后如果您使用adodc控件,则设置相关属性。

设置adodc控件的属性后,右键单击datagrid并选择检索字段。


如果你要编码然后将记录集设置为数据网格

这里是一个例子

这里Myrs2是记录集

''设置在光标位置

MyRs2.CursorLocation = adUseClient

MyRs2.Open" select * from investmentdetails",MyCon,adOpenDynamic,adLockOptimistic

''设置数据源到记录集

设置DataGrid1.DataSource = MyRs2


下一次上一次请把你的代码放到你的代码上


祝你好运
The link by ansuman will help you if you are using visual studio 2005
The below is the exact link for it (i presume)
Please do read the tutorial carefully
http://msdn.microsoft.com/library/de...ridControl.asp

First check out the allowaddnew property set it to true
Thereafter if you are using a adodc control then set the relevant properties.
After setting the properties of adodc control right click on the datagrid and choose retrieve fields.

In case you are going to code then set the recordset to the datagrid
here''s an example
Here Myrs2 is the record set
''Set on the cursor location
MyRs2.CursorLocation = adUseClient
MyRs2.Open "select * from investmentdetails ", MyCon, adOpenDynamic, adLockOptimistic
''Set the datasource to the record set
Set DataGrid1.DataSource = MyRs2

NEXT TIME ONWARDS PLEASE PUT ON YOUR CODE

Good luck


这篇关于数据网格问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆