网格视图动态创建 [英] grid view dynamic creation

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

问题描述

当我在文本框中输入3时,应显示3行的GRID VIEW。

每行编辑和删除按钮应显示。 />
当我点击编辑按钮时,应显示弹出窗口,然后我必须输入数据,当我点击弹出窗口中的''OK BUTTON'时,数据应该显示在GridView Row中。 />
最后当我点击保存按钮时,所有gridView数据都应保存到数据库中。

when i enter 3 in a text box a GRID VIEW with 3 rows should be shown.
on each row ''edit'' and ''Delete'' button should be shown.
when i click on edit button a popup should be shown and then i have to enter the data and when i click ''OK BUTTON'' on that popup the data should be shown in that GridView Row .
and finally when i click save button all gridView data should be saved into database.

推荐答案

DataGridView [ ^ ],并添加行和列以及它们的属性(根据需要)。您可以通过在Visual Studio中创建一个表单来找出大部分代码,其中包含 DataGridView 。添加您需要的各种属性,然后查看生成的代码。
Start with a new instance of the DataGridView Class[^], and add rows and columns, and their properties, as required. You can figure out most of the code by creating a form in Visual Studio, with a DataGridView on it. Add the various properties you require, and then look at the generated code.


试试这个

http://www.codedigest.com/Articles/ASPNET/168_Create_Dynamic_GridView_Control_in_C_ASPNet.aspx [ ^ ]


这篇关于网格视图动态创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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