如何使用一个数据网格更新/插入另一个数据网格 [英] How to use one datagrid to update/insert into another

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

问题描述

我不在乎有人建议我这样做,但我一直在寻找关于如何实现这个概念的日子

。我正在尝试使用某种网格

控制(不一定是网格控件,无论什么效果最好)到

显示下拉菜单从表tblInvoiceData填充的字段。

此控件还包括一个用户可以输入值的文本框。

这两列是并排而不是垂直布局。


然后用户点击添加按钮按钮和那个特定字段和

值显示在一个网格中(可以是这个原始网格或另一个),但是,
不会更新数据库表,直到用户完成添加所有

他们的字段然后点击UPDATE按钮,此时

更新此特定clientID的tblInvoiceData。


帮助!!!

解决方案

您要重新发布多少次? Cor的回答

意味着:你问的问题太广了。


如果第一个控件只有一个值,请使用组合框。

将它绑定到您的tblInvoiceData。在它旁边放一个文本框。

在旁边放一个按钮。添加一个事件处理程序到

按钮。


在底部放置一个网格。当他们点击< Addbutton时,

将一条记录添加到网格中。


我认为这就是你想要的。解决问题

一次一个。好像你要我们为你写完

整件事。我会帮你的,但是你会给我一个账单地址...... ;-)

Robin S.

-----------------------------

< sh ** ***@gmail.com写在消息中

新闻:11 ******************** @ 73g2000cwn.googlegroup s.com ...


>我不在乎有人建议我这样做,但我一直在寻找数天

如何实现这个概念。我正在尝试使用某种网格

控制(不一定是网格控件,无论什么效果最好)到

显示下拉菜单从表tblInvoiceData填充的字段。

此控件还包括一个用户可以输入值的文本框。

这两列是并排而不是垂直布局。


然后用户点击添加按钮按钮和那个特定字段和

值显示在一个网格中(可以是这个原始网格或另一个),但是,
不会更新数据库表,直到用户完成添加所有

他们的字段然后点击UPDATE按钮,此时

更新此特定clientID的tblInvoiceData。


帮助!!!



Moreso,我想他的回答是说我要求太具体了

题。我实际上已经完成了你在那里描述的内容,但

的问题是,一旦用户试图添加另一个项目,它就会将b $ b替换为第一个值添加到第二个网格。


RobinS写道:


你要重新发布多少次这个? Cor的回答

意味着:你问的问题太广了。


如果第一个控件只有一个值,请使用组合框。

将它绑定到您的tblInvoiceData。在它旁边放一个文本框。

在旁边放一个按钮。添加一个事件处理程序到

按钮。


在底部放置一个网格。当他们点击< Addbutton时,

将一条记录添加到网格中。


我认为这就是你想要的。解决问题

一次一个。好像你要我们为你写完

整件事。我会帮你的,但是你会给我一个账单地址...... ;-)

Robin S.

-----------------------------

< sh ** ***@gmail.com写在消息中

新闻:11 ******************** @ 73g2000cwn.googlegroup s.com ...


我不在乎有人建议我这样做,但我一直在搜索

如何实施这个概念。我正在尝试使用某种网格

控制(不一定是网格控件,无论什么效果最好)到

显示下拉菜单从表tblInvoiceData填充的字段。

此控件还包括一个用户可以输入值的文本框。

这两列是并排而不是垂直布局。


然后用户点击添加按钮按钮和那个特定字段和

值显示在一个网格中(可以是这个原始网格或另一个),但是,
不会更新数据库表,直到用户完成添加所有

他们的字段然后点击UPDATE按钮,此时

更新此特定clientID的tblInvoiceData。


帮助!


不,你问得太宽泛了。它就像某人

发布了一个问题告诉我有关Windows窗体的信息。或者告诉我

关于ADO.Net。好吧,有超过一千页b $ b页的书,你如何在新闻组中回答?去买书。


这是一个更具体的问题。在将值放入之前,您是否在第二个网格中添加了一行

?你好吗

将值放入/添加到网格中?

发布该代码,我们可以帮助你。

Robin S.

---------------------------------- ------

< sh ***** @ gmail.com写信息

新闻:11 *********** ***********@16g2000cwy.googlegro ups.com ...


Moreso,我想他的回答是说我在问太具体了

问题。我实际上已经完成了你在那里描述的内容,但

的问题是,一旦用户试图添加另一个项目,它就会将b $ b替换为第一个值添加到第二个网格。


RobinS写道:


>你要重发多少次这个? Cor的回答
意味着:你问的问题太广了。

如果第一个控件只有一个值,请使用组合框。
将它绑定到你的tblInvoiceData 。在它旁边放一个文本框。
在旁边放一个按钮。在
按钮上添加一个事件处理程序。

在底部放置一个网格。当他们点击< Addbutton时,
将一条记录添加到网格中。

我认为这就是你想要的。一次解决一个问题。好像你要我们为你写完整件事。我会帮你的,但你会给我一个账单地址...... ;-)

Robin S.
---- -------------------------
< sh ***** @ gmail.com写信息
新闻:11 ********************@73g2000cwn.googlegrou ps.com ...


>我不喜欢我不在乎有人建议我这样做,但我一直在寻找

如何实现这个概念。我正在尝试使用某种

网格

控制(不一定是网格控制,无论什么效果最好)来

显示从表中填充的字段的下拉菜单

tblInvoiceData。

此控件还包括一个文本框,用户可以输入一个

价值。

这两列是并排而不是垂直布局。


然后用户点击添加按钮。按钮和那个特定字段



值显示在一个网格中(可以是这个原始网格或另一个),

但是,
不更新数据库表,直到用户完成添加

所有

他们的字段然后点击UPDATE按钮,此时

更新此特定clientID的tblInvoiceData。


帮助!!!



I don''t care how one suggests I do it, but I''ve been searching for days
on how to implement this concept. I''m trying to use some kind of grid
control (doesn''t have to be a grid control, whatever works best) to
display a dropdown menu of fields populated from table tblInvoiceData.
This control also includes a textbox which the user can input a value.
These two columns are side by side and not in a vertical layout.

The user then clicks on the "add" button and that particular field and
value displays in a grid (can be this original grid or another), BUT,
does not update the database tables until the user finshes adding all
their fields and then clicks on the UPDATE button, at which point
updates tblInvoiceData for this particular clientID.

HELP!!!

解决方案

How many times are you going to re-post this? Cor''s response
means this: You are asking too broad a question.

If the first control has only one value, use a combobox.
Bind it to your tblInvoiceData. Put a textbox next to it.
Put a button next to that. Add an event handler to the
button.

Put a grid on the bottom. When they click on the <Addbutton,
add a record to the grid.

I think that''s what you''re going for. Tackle the problems
one at a time. It seems like you''re asking us to write the
whole thing for you. I''d do that for you, but you''ll have
to send me a billing address... ;-)

Robin S.
-----------------------------
<sh*****@gmail.comwrote in message
news:11********************@73g2000cwn.googlegroup s.com...

>I don''t care how one suggests I do it, but I''ve been searching for days
on how to implement this concept. I''m trying to use some kind of grid
control (doesn''t have to be a grid control, whatever works best) to
display a dropdown menu of fields populated from table tblInvoiceData.
This control also includes a textbox which the user can input a value.
These two columns are side by side and not in a vertical layout.

The user then clicks on the "add" button and that particular field and
value displays in a grid (can be this original grid or another), BUT,
does not update the database tables until the user finshes adding all
their fields and then clicks on the UPDATE button, at which point
updates tblInvoiceData for this particular clientID.

HELP!!!



Moreso, I think his response is saying I''m asking too specific a
question. I''ve actually done what you''ve described there, but the
problem with that is once the user tries to add another item, it
replaces the first value added to the 2nd grid.

RobinS wrote:

How many times are you going to re-post this? Cor''s response
means this: You are asking too broad a question.

If the first control has only one value, use a combobox.
Bind it to your tblInvoiceData. Put a textbox next to it.
Put a button next to that. Add an event handler to the
button.

Put a grid on the bottom. When they click on the <Addbutton,
add a record to the grid.

I think that''s what you''re going for. Tackle the problems
one at a time. It seems like you''re asking us to write the
whole thing for you. I''d do that for you, but you''ll have
to send me a billing address... ;-)

Robin S.
-----------------------------
<sh*****@gmail.comwrote in message
news:11********************@73g2000cwn.googlegroup s.com...

I don''t care how one suggests I do it, but I''ve been searching for days
on how to implement this concept. I''m trying to use some kind of grid
control (doesn''t have to be a grid control, whatever works best) to
display a dropdown menu of fields populated from table tblInvoiceData.
This control also includes a textbox which the user can input a value.
These two columns are side by side and not in a vertical layout.

The user then clicks on the "add" button and that particular field and
value displays in a grid (can be this original grid or another), BUT,
does not update the database tables until the user finshes adding all
their fields and then clicks on the UPDATE button, at which point
updates tblInvoiceData for this particular clientID.

HELP!!!


No, you''re asking too broad a question. It''s like someone
posted a question "Tell me about Windows Forms". Or "Tell me
about ADO.Net". Well, there are books of over a thousand
pages, how do you answer that in a newsgroup? Go buy a book.

This is a more specific question. Are you adding a row
to the 2nd grid before putting the values in? How are you
putting the values in / adding the information to the grid?
Post that code, and we can help you with it.

Robin S.
----------------------------------------
<sh*****@gmail.comwrote in message
news:11**********************@16g2000cwy.googlegro ups.com...

Moreso, I think his response is saying I''m asking too specific a
question. I''ve actually done what you''ve described there, but the
problem with that is once the user tries to add another item, it
replaces the first value added to the 2nd grid.

RobinS wrote:

>How many times are you going to re-post this? Cor''s response
means this: You are asking too broad a question.

If the first control has only one value, use a combobox.
Bind it to your tblInvoiceData. Put a textbox next to it.
Put a button next to that. Add an event handler to the
button.

Put a grid on the bottom. When they click on the <Addbutton,
add a record to the grid.

I think that''s what you''re going for. Tackle the problems
one at a time. It seems like you''re asking us to write the
whole thing for you. I''d do that for you, but you''ll have
to send me a billing address... ;-)

Robin S.
-----------------------------
<sh*****@gmail.comwrote in message
news:11********************@73g2000cwn.googlegrou ps.com...

>I don''t care how one suggests I do it, but I''ve been searching for
days
on how to implement this concept. I''m trying to use some kind of
grid
control (doesn''t have to be a grid control, whatever works best) to
display a dropdown menu of fields populated from table
tblInvoiceData.
This control also includes a textbox which the user can input a
value.
These two columns are side by side and not in a vertical layout.

The user then clicks on the "add" button and that particular field
and
value displays in a grid (can be this original grid or another),
BUT,
does not update the database tables until the user finshes adding
all
their fields and then clicks on the UPDATE button, at which point
updates tblInvoiceData for this particular clientID.

HELP!!!



这篇关于如何使用一个数据网格更新/插入另一个数据网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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