GridView编辑 [英] GridView Editing

查看:71
本文介绍了GridView编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以自从我上一篇文章以来,我已经测试了Gridview和DataView控件,看起来好像它们会更好一些。但是,我很难实现编辑模式。在那些控件上允许用户编辑数据。我似乎无法真正找到一步一步。如何做的例子。任何帮助都会很棒。


再次感谢

Ok, so since my last post I''ve tested the Gridview and DataView controls and it appears as though those would work a little better. However, I''m having difficultly implementing the "Edit mode" on those controls to allow the user to edit the data. I can''t really seem to find a "step by step" example of of how to do it. Any assistance would be great.

Thank again

推荐答案

你究竟遇到了什么问题?

如果要编辑行,则实现一个处理GridView.RowEditing事件的方法,并将GridView.EditIndex设置为e.NewEditIndex,以编辑选择进行编辑的行。


例如:

What exactly are you having problems with?
If you want to edit a row then implement a method that handles the GridView.RowEditing event and set the GridView.EditIndex to the e.NewEditIndex to edit the row that was selected for editing.

For example:

展开 | 选择 | Wrap < span class =codeDivider> | 行号


我需要写屏幕上的矩阵,让用户更新他们需要的任何一个单元格(即文本框)。完成后,他们会单击一个提交按钮来更新数据库。下面是一个例子。

I need to write the matrix to the screen and let the user update whichever cell they need (i.e. textboxes). Once they are complete they would click a submit button to update the database. An example is below.


嗯所以你需要每个单元格都可以编辑。


In在这种情况下,我认为您将要使用GridView进行编辑(其中每个元素都显示在TextBoxes中)和GridView用于显示目的...只是因为我不确定如何使每行可编辑同时处于编辑模式。


你看到我得到了什么吗?


-Frinny
Hmm so you need every cell to be editable.

In this case I think that you are going to want to use a GridView for editing purposes (where every element is displayed in TextBoxes) and a GridView for display purposes...simply because I''m not sure how you would make every row editable at the same time in edit mode.

Do you see what I''m getting at?

-Frinny


这篇关于GridView编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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