如何从DevExpress GridControl获取值到文本框 [英] How to get values from DevExpress GridControl to textboxes

查看:221
本文介绍了如何从DevExpress GridControl获取值到文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个项目窗口应用程序。表格中有一些文本框,组合框和一个DevExpress GridControl。用户将选择或输入值。之后,用户将保存,然后所有信息将被发送到gridcontrol以查看和列出。保存没问题,没有问题。



但是,为了更新,gridcontrol中的所有值都必须发送到文本框和组合框。



如何从DevExpress GridControl获取文本和组合框的值?



问候



Haluk

Hello guys,

I have a project windows application.There are some textboxes, comboboxes and one DevExpress GridControl in the form. The user is going to choose or enter the values into them. After that, the user will save and then all information will be sent to the gridcontrol to see and to list. To save is OK, there is no problem.

However, to update, all values in the gridcontrol must be sent to the textboxes and comboboxes.

What can I do to get the values from DevExpress GridControl to text and combo boxes?

Regards

Haluk

推荐答案

好吧,DevXpress控件富含客户端功能。



您可以通过调用以下方法获取示例中的行值:



http://documentation.devexpress.com/#AspNet/DevExpressWebASPxGridViewScriptsASPxClientGridView_GetRowValuestopic [ ^ ]



你会发现关于devexpress网站的很多例子,或者你可以在这里进行搜索:



http://search.devexpress.com/?p=T4%7cP5%7c57&d=16 [ ^ ]



我希望这很有帮助。



PS



下次尝试让你的问题更清楚。



干杯
Well, DevXpress controls are rich with client side functionalities.

You can get the row values at example by calling the following method:

http://documentation.devexpress.com/#AspNet/DevExpressWebASPxGridViewScriptsASPxClientGridView_GetRowValuestopic[^]

You will find many examples on devexpress site, or you can perform a search here:

http://search.devexpress.com/?p=T4%7cP5%7c57&d=16[^]

I hope this was helpfull.

P.S.

Next time try to make your question clearer.

Cheers


为什么不将Field数据源绑定到Grid数据源

,如下所示;



Me.txtCode.DataBindings.Add(" EditValue",Me.GridView1.DataSource," Code",True,DataSourceUpdateMode.OnPropertyChanged,"")



然后在TextEditor或ListEditor的EditValeChanged事件上

Me.BindingContext(Me.GridView1).EndCurrentEdit()

Me.GridView1.RefreshData()



为我工作

KISS(保持简单?)
Why not just bind the Field the the Grid DataSource
as in;

Me.txtCode.DataBindings.Add("EditValue", Me.GridView1.DataSource, "Code", True, DataSourceUpdateMode.OnPropertyChanged, "")

Then on the EditValeChanged event of the TextEditor or ListEditor
Me.BindingContext(Me.GridView1).EndCurrentEdit()
Me.GridView1.RefreshData()

Worked for me
KISS (Keep it Simple ?)


我可以通过以下鳕鱼帮助你:



textbox1.text = gridView1.Columns.View .GetFocusedRowCellValue(你的fild);
I could help you by below cod:

textbox1.text= gridView1.Columns.View .GetFocusedRowCellValue ("your fild");


这篇关于如何从DevExpress GridControl获取值到文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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