热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

如何在gridview中插入多个dropdownlistbox?-Howtoinsertmultipledropdownlistboxingridview?

GridViewdisplaysdatafromdifferenttablessoicantdolikethereenterlinkdescriptionhereor

GridView displays data from different tables so i can't do like there enter link description here or there enter link description here

GridView显示来自不同表的数据,所以我不能像这里输入链接描述或在那里输入链接描述

How it do dynamically?

它是如何动态的?

There my code where I bind GridView:

我的代码在哪里绑定GridView:

        OracleCommand oracleCom = new OracleCommand();
        oracleCom.COnnection= oraConnect;
        oracleCom.CommandText = "Select * From " + Session["tableNameIns"];

        OracleDataAdapter adapter = new OracleDataAdapter();
        DataTable tableD = new DataTable();
        tableD.Locale = System.Globalization.CultureInfo.InvariantCulture;
        adapter.SelectCommand = oracleCom;
        adapter.Fill(tableD);           
        tableResults.DataSource = tableD.AsDataView();
        tableResults.DataBind();

Examples: 1. Table Objects: dropdownlist for column object_type. enter image description here 2. Table Details: dropdownlist for columns point, object, patch. enter image description here 3. ...

示例:1。表对象:列object_type的下拉列表。 2.表详细信息:列点,对象,补丁的下拉列表。 3. ...

2 个解决方案

#1


0  

check here Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

在这里检查可编辑的Gridview与文本框,CheckBox,单选按钮和DropDown列表

#2


0  

For drop down list in grid view for editing mode you should set tag EditItemTemplete and binding this grid view from database you should handle RowDataBound event, from this event you can bind drop down list from different tables. And this all are described in the article already.
Just one suggestion that download the source code from reference link try to debug by applying break points to understand briefly...

对于编辑模式的网格视图中的下拉列表,您应该设置标记EditItemTemplete并从数据库绑定此网格视图,您应该处理RowDataBound事件,从此事件您可以绑定来自不同表的下拉列表。这一切都已在文章中描述。只有一个建议从参考链接下载源代码尝试通过应用断点来简单地理解调试...


推荐阅读
author-avatar
手机用户2502881923
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有