简体   繁体   English

从GridView向ListBox添加项目

[英]Add item to ListBox from GridView

I have a ListBox present in Home page which is populated from database . 我在主页中有一个ListBox ,它是从数据库中填充的。 The Home page home.aspx also has an <iframe> which is loaded with another page which displays a GridView . 主页home.aspx还有一个<iframe> ,它加载了另一个显示GridView的页面。

The GridView has option to Add item to a table m_my_table . GridView具有将项添加到表m_my_table

This same table m_my_table is DataSource of list-box present in Home page home.aspx . 同一个表m_my_table是主页home.aspx中出现的列表框的DataSource

How can I add item to ListBox as soon as item is added in GridView ? GridView中添加项目后,如何将项目添加到ListBox Please help in doing this with or without page Reload. 无论有没有页面重新加载,请帮助完成此操作。

How can O call listbox databind( ) function in homepage after gridview databinding function has been called in iframe page. 在iframe页面中调用gridview数据绑定函数后,如何在主页中调用listbox databind()函数。

每当将项目插入到gridview中时,将所选项目和类型转换为特定类型,然后添加到列表中。记住,当项目插入到网格中时,行已被选中,因为焦点位于要插入的行上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM